From 95d4321284ec2d6764890ef5c0a134935e78c230 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Tue, 29 Oct 2024 16:01:13 +0700 Subject: [PATCH] fix: typo --- src/controllers/01-branch-controller.ts | 2 +- src/controllers/04-flow-template-controller.ts | 2 +- src/interfaces/user.ts | 2 +- src/services/keycloak.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controllers/01-branch-controller.ts b/src/controllers/01-branch-controller.ts index c1f741c..0f7de6e 100644 --- a/src/controllers/01-branch-controller.ts +++ b/src/controllers/01-branch-controller.ts @@ -475,7 +475,7 @@ export class BranchController extends Controller { if (body.headOfficeId === branchId) throw new HttpError( HttpStatus.BAD_REQUEST, - "Cannot make this as headquaters and branch at the same time.", + "Cannot make this as headquarters and branch at the same time.", "cantMakeHQAndBranchSameTime", ); diff --git a/src/controllers/04-flow-template-controller.ts b/src/controllers/04-flow-template-controller.ts index 3d5a3a7..d7bf3fe 100644 --- a/src/controllers/04-flow-template-controller.ts +++ b/src/controllers/04-flow-template-controller.ts @@ -120,7 +120,7 @@ export class FlowTemplateController extends Controller { if (!userAffiliatedBranch) { throw new HttpError( HttpStatus.BAD_REQUEST, - "You must be affilated with at least one branch or specifiy branch to be registered (System permission required).", + "You must be affilated with at least one branch or specify branch to be registered (System permission required).", "reqMinAffilatedBranch", ); } diff --git a/src/interfaces/user.ts b/src/interfaces/user.ts index 3bf51f2..4b586de 100644 --- a/src/interfaces/user.ts +++ b/src/interfaces/user.ts @@ -5,7 +5,7 @@ export type RequestWithUser = Request & { sub: string; name: string; given_name: string; - familiy_name: string; + family_name: string; preferred_username: string; email: string; roles: string[]; diff --git a/src/services/keycloak.ts b/src/services/keycloak.ts index 7388ad6..7ae0f4a 100644 --- a/src/services/keycloak.ts +++ b/src/services/keycloak.ts @@ -94,7 +94,7 @@ export async function listUser(search = "", page = 1, pageSize = 30) { /** * Count user in the system. Can be use for pagination purpose. * - * @returns numer of user on success. + * @returns user count on success. */ export async function countUser(search = "") { const res = await fetch(