tsoa setup
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { Controller, Get, Route, SuccessResponse } from 'tsoa';
|
||||
|
||||
export interface User {
|
||||
email: string;
|
||||
name: string;
|
||||
phoneNumbers: string[];
|
||||
}
|
||||
|
||||
export type UserCreationParams = Pick<User, "email" | "name" | "phoneNumbers">;
|
||||
|
||||
@Route('health')
|
||||
export class HealthCheckController extends Controller {
|
||||
@Get('ok')
|
||||
@SuccessResponse('200', 'OK')
|
||||
public async getOk(
|
||||
): Promise<string> {
|
||||
this.setStatus(200);
|
||||
return 'Ok';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user