add troubleshooting controller and field otherNationality
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
This commit is contained in:
parent
5c75c27470
commit
7fe0512a2f
8 changed files with 55 additions and 15 deletions
|
|
@ -74,6 +74,7 @@ type EmployeeCreate = {
|
|||
dateOfBirth?: Date | null;
|
||||
gender: string;
|
||||
nationality: string;
|
||||
otherNationality?: string;
|
||||
|
||||
namePrefix?: string | null;
|
||||
firstName?: string;
|
||||
|
|
@ -110,6 +111,7 @@ type EmployeeUpdate = {
|
|||
dateOfBirth?: Date;
|
||||
gender?: string;
|
||||
nationality?: string;
|
||||
otherNationality?: string;
|
||||
|
||||
namePrefix?: string | null;
|
||||
firstName?: string;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ type EmployeePassportPayload = {
|
|||
|
||||
workerStatus: string;
|
||||
nationality: string;
|
||||
otherNationality: string;
|
||||
namePrefix?: string | null;
|
||||
firstName: string;
|
||||
firstNameEN: string;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ type QuotationCreate = {
|
|||
dateOfBirth: Date;
|
||||
gender: string;
|
||||
nationality: string;
|
||||
otherNationality?: string;
|
||||
namePrefix?: string;
|
||||
firstName: string;
|
||||
firstNameEN: string;
|
||||
|
|
@ -112,6 +113,7 @@ type QuotationUpdate = {
|
|||
dateOfBirth: Date;
|
||||
gender: string;
|
||||
nationality: string;
|
||||
otherNationality?: string;
|
||||
|
||||
namePrefix?: string;
|
||||
firstName?: string;
|
||||
|
|
@ -1008,6 +1010,7 @@ export class QuotationActionController extends Controller {
|
|||
dateOfBirth: Date;
|
||||
gender: string;
|
||||
nationality: string;
|
||||
otherNationality?: string;
|
||||
namePrefix?: string;
|
||||
firstName: string;
|
||||
firstNameEN: string;
|
||||
|
|
@ -1030,6 +1033,7 @@ export class QuotationActionController extends Controller {
|
|||
dateOfBirth: Date;
|
||||
gender: string;
|
||||
nationality: string;
|
||||
otherNationality?: string;
|
||||
namePrefix?: string;
|
||||
firstName: string;
|
||||
firstNameEN: string;
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ type DebitNoteCreate = {
|
|||
dateOfBirth: Date;
|
||||
gender: string;
|
||||
nationality: string;
|
||||
otherNationality: string;
|
||||
namePrefix?: string;
|
||||
firstName: string;
|
||||
firstNameEN: string;
|
||||
|
|
@ -111,6 +112,7 @@ type DebitNoteUpdate = {
|
|||
dateOfBirth: Date;
|
||||
gender: string;
|
||||
nationality: string;
|
||||
otherNationality: string;
|
||||
namePrefix?: string;
|
||||
firstName?: string;
|
||||
firstNameEN: string;
|
||||
|
|
|
|||
25
src/controllers/10-troubleshooting-controller.ts
Normal file
25
src/controllers/10-troubleshooting-controller.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import express from "express";
|
||||
import { Controller, Get, Path, Request, Route } from "tsoa";
|
||||
import { getFile } from "../utils/minio";
|
||||
|
||||
@Route("api/v1/troubleshooting")
|
||||
export class TroubleshootingController extends Controller {
|
||||
@Get()
|
||||
async get(@Request() req: express.Request) {
|
||||
return req.res?.redirect(await getFile(".troubleshooting/toc.json"));
|
||||
}
|
||||
|
||||
@Get("{category}/assets/{name}")
|
||||
async getAsset(@Request() req: express.Request, @Path() category: string, @Path() name: string) {
|
||||
return req.res?.redirect(await getFile(`.troubleshooting/${category}/assets/${name}`));
|
||||
}
|
||||
|
||||
@Get("{category}/page/{page}")
|
||||
async getContent(
|
||||
@Request() req: express.Request,
|
||||
@Path() category: string,
|
||||
@Path() page: string,
|
||||
) {
|
||||
return req.res?.redirect(await getFile(`.troubleshooting/${category}/${page}.md`));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue