Method
get
(
req: AuthedRequestWithTenantAndBody<getMessageType>,
res: Response,
next: NextFunction
)
Source from the content-addressed store, hash-verified
| 22 | |
| 23 | export class MessagesController { |
| 24 | static async get( |
| 25 | req: AuthedRequestWithTenantAndBody<getMessageType>, |
| 26 | res: Response, |
| 27 | next: NextFunction |
| 28 | ) { |
| 29 | const message = await MessagesService.get({ |
| 30 | ...req.body, |
| 31 | accountId: req.tenant?.id!, |
| 32 | }); |
| 33 | if (!message) { |
| 34 | return next(new NotFound()); |
| 35 | } |
| 36 | res.json(message); |
| 37 | } |
| 38 | |
| 39 | static async delete( |
| 40 | req: AuthedRequestWithTenantAndBody<deleteMessageType>, |
Tested by
no test coverage detected