diff --git a/packages/api/src/controllers/admin/manage/Businesses.ts b/packages/api/src/controllers/admin/manage/Businesses.ts index a1dbaf97c..63353d2c8 100644 --- a/packages/api/src/controllers/admin/manage/Businesses.ts +++ b/packages/api/src/controllers/admin/manage/Businesses.ts @@ -8,7 +8,7 @@ import { prisma } from "../../../lib/prisma"; import { IsAuth } from "../../../middlewares"; @UseBeforeEach(IsAuth) -@Controller("/businesses-admin") +@Controller("/admin/manage/businesses") export class ManageBusinessesController { @Get("/") async getBusinesses() { diff --git a/packages/api/src/controllers/admin/manage/CadSettings.ts b/packages/api/src/controllers/admin/manage/CadSettings.ts index 6d72aa31c..5348b4105 100644 --- a/packages/api/src/controllers/admin/manage/CadSettings.ts +++ b/packages/api/src/controllers/admin/manage/CadSettings.ts @@ -14,7 +14,7 @@ import { UseBefore } from "@tsed/common"; import { Socket } from "../../../services/SocketService"; import { nanoid } from "nanoid"; -@Controller("/cad-settings") +@Controller("/admin/manage/cad-settings") export class ManageCitizensController { private socket: Socket; constructor(socket: Socket) { diff --git a/packages/api/src/controllers/admin/manage/Citizens.ts b/packages/api/src/controllers/admin/manage/Citizens.ts index 8c3c4a760..290ba43c0 100644 --- a/packages/api/src/controllers/admin/manage/Citizens.ts +++ b/packages/api/src/controllers/admin/manage/Citizens.ts @@ -8,7 +8,7 @@ import { prisma } from "../../../lib/prisma"; import { IsAuth } from "../../../middlewares"; @UseBeforeEach(IsAuth) -@Controller("/citizens") +@Controller("/admin/manage/citizens") export class ManageCitizensController { @Get("/") async getCitizens() { diff --git a/packages/api/src/controllers/admin/manage/Units.ts b/packages/api/src/controllers/admin/manage/Units.ts index 77b5f0e41..36c1265e7 100644 --- a/packages/api/src/controllers/admin/manage/Units.ts +++ b/packages/api/src/controllers/admin/manage/Units.ts @@ -10,7 +10,7 @@ import { IsAuth } from "../../../middlewares"; const include = unitProperties; @UseBeforeEach(IsAuth) -@Controller("/units") +@Controller("/admin/manage/units") export class ManageUnitsController { @Get("/") async getUnits() { diff --git a/packages/api/src/controllers/admin/manage/Users.ts b/packages/api/src/controllers/admin/manage/Users.ts index 4fe290de0..899f7919d 100644 --- a/packages/api/src/controllers/admin/manage/Users.ts +++ b/packages/api/src/controllers/admin/manage/Users.ts @@ -13,7 +13,7 @@ import { nanoid } from "nanoid"; import { genSaltSync, hashSync } from "bcrypt"; @UseBeforeEach(IsAuth) -@Controller("/users") +@Controller("/admin/manage/users") export class ManageUsersController { private socket: Socket; constructor(socket: Socket) { diff --git a/packages/api/src/controllers/business/BusinessController.ts b/packages/api/src/controllers/business/BusinessController.ts index 63b152473..f7b83ea7f 100644 --- a/packages/api/src/controllers/business/BusinessController.ts +++ b/packages/api/src/controllers/business/BusinessController.ts @@ -14,7 +14,7 @@ import { prisma } from "../../lib/prisma"; import { EmployeeAsEnum, MiscCadSettings, WhitelistStatus } from ".prisma/client"; @UseBeforeEach(IsAuth) -@Controller("/") +@Controller("/businesses") export class BusinessController { @Get("/") async getBusinessesByUser(@Context() ctx: Context) { diff --git a/packages/api/src/controllers/business/EmployeeController.ts b/packages/api/src/controllers/business/EmployeeController.ts index 87ffd3604..d11de9f6c 100644 --- a/packages/api/src/controllers/business/EmployeeController.ts +++ b/packages/api/src/controllers/business/EmployeeController.ts @@ -9,7 +9,7 @@ import { prisma } from "../../lib/prisma"; import { EmployeeAsEnum, WhitelistStatus } from ".prisma/client"; @UseBeforeEach(IsAuth) -@Controller("/employees") +@Controller("/businesses/employees") export class BusinessEmployeeController { @Put("/:businessId/:id") async updateEmployee( diff --git a/packages/api/src/controllers/business/PostsController.ts b/packages/api/src/controllers/business/PostsController.ts index ad291239c..3442bdf67 100644 --- a/packages/api/src/controllers/business/PostsController.ts +++ b/packages/api/src/controllers/business/PostsController.ts @@ -12,7 +12,7 @@ import { BadRequest, Forbidden, NotFound } from "@tsed/exceptions"; import { prisma } from "../../lib/prisma"; @UseBeforeEach(IsAuth) -@Controller("/posts") +@Controller("/businesses/posts") export class BusinessPostsController { @Post("/:id") async createPost( diff --git a/packages/api/src/server.ts b/packages/api/src/server.ts index 9453a1df5..88e68a84e 100644 --- a/packages/api/src/server.ts +++ b/packages/api/src/server.ts @@ -17,8 +17,6 @@ const rootDir = __dirname; }, mount: { "/v1": [`${rootDir}/controllers/**/*.ts`], - "/v1/admin/manage": [`${rootDir}/controllers/admin/manage/*.ts`], - "/v1/businesses": [`${rootDir}/controllers/business/*.ts`], }, statics: { "/static": [ diff --git a/packages/client/locales/en/business.json b/packages/client/locales/en/business.json index 7137a9677..fad40a8cf 100644 --- a/packages/client/locales/en/business.json +++ b/packages/client/locales/en/business.json @@ -31,6 +31,8 @@ "pendingEmployees": "Pending Employees", "noPendingEmployees": "There are no employees pending access.", "businessIsWhitelisted": "This business is whitelisted. You will be able to view it once you're accepted.", + "postTitle": "Post Title", + "postBody": "Post Body", "alert_fireEmployee": "Are you sure you want to fire {employee}? This action cannot be undone.", "alert_deletePost": "Are you sure you want to delete this post? This action cannot be undone.", "alert_deleteBusiness": "Are you sure you want to delete \"{business}\"? This action cannot be undone." diff --git a/packages/client/src/components/business/ManagePostModal.tsx b/packages/client/src/components/business/ManagePostModal.tsx index 6dc3e9fbb..23d52fe7b 100644 --- a/packages/client/src/components/business/ManagePostModal.tsx +++ b/packages/client/src/components/business/ManagePostModal.tsx @@ -28,7 +28,6 @@ export const ManageBusinessPostModal = ({ onClose, onCreate, onUpdate, post }: P const { state, execute } = useFetch(); const common = useTranslations("Common"); const t = useTranslations("Business"); - const bleeter = useTranslations("Bleeter"); if (!currentBusiness || !currentEmployee) { return null; @@ -82,7 +81,7 @@ export const ManageBusinessPostModal = ({ onClose, onCreate, onUpdate, post }: P {({ handleChange, errors, values, isValid }) => (
- + {errors.title} - +