From 9f851cc1806c00b4decd3be29d98109e24a03fef Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 25 Jan 2024 23:33:42 +0100 Subject: [PATCH] changed lengths --- src/controllers/usersController.ts | 1 - src/routes/storeServicesRoutes.ts | 2 +- src/utils/constants.ts | 4 ++-- src/validator/validator.ts | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/controllers/usersController.ts b/src/controllers/usersController.ts index 982af4f..525d010 100644 --- a/src/controllers/usersController.ts +++ b/src/controllers/usersController.ts @@ -15,7 +15,6 @@ import { import User from "../models/user"; import { Roles } from "../utils/constants"; import Store from "../models/store"; -import axios from "axios"; export async function AddEmployee(req: Request, res: Response) { try { diff --git a/src/routes/storeServicesRoutes.ts b/src/routes/storeServicesRoutes.ts index ab2cf13..5dea5d4 100644 --- a/src/routes/storeServicesRoutes.ts +++ b/src/routes/storeServicesRoutes.ts @@ -4,7 +4,7 @@ const router = express.Router(); import * as storeServicesController from "../controllers/storeServicesController"; router.get("/:storeId", storeServicesController.GetStoreServices); -router.post("/", storeServicesController.CreateStoreService); +router.post("/service", storeServicesController.CreateStoreService); router.post("/update", storeServicesController.UpdateStoreService); router.post("/activity", storeServicesController.CreateStoreServiceActivity); router.get( diff --git a/src/utils/constants.ts b/src/utils/constants.ts index d4abcd0..1d096b4 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -16,10 +16,10 @@ export const USER_ID_LENGTH = 36; export const HEADER_X_AUTHORIZATION: string = "x-authorization"; export const STORE_SERVICE_MIN_LENGTH = 3; -export const STORE_SERVICE_MAX_LENGTH = 32; +export const STORE_SERVICE_MAX_LENGTH = 64; export const STORE_SERVICE_ACTIVITY_NAME_MIN_LENGTH = 3; -export const STORE_SERVICE_ACTIVITY_NAME_MAX_LENGTH = 32; +export const STORE_SERVICE_ACTIVITY_NAME_MAX_LENGTH = 64; export const STORE_SERVICE_ACTIVITY_DESCRIPTION_MIN_LENGTH = 3; export const STORE_SERVICE_ACTIVITY_DESCRIPTION_MAX_LENGTH = 1024; diff --git a/src/validator/validator.ts b/src/validator/validator.ts index a389009..b91a725 100644 --- a/src/validator/validator.ts +++ b/src/validator/validator.ts @@ -46,7 +46,6 @@ export async function isAccountNameValid(accountName: string) { }); if (existingUser) { - logger.debug("User already exists with this accountName: %s", accountName); return false; }