feat: add customer branch controller
This commit is contained in:
parent
7d26d6a9ea
commit
20d9598a4e
1 changed files with 35 additions and 0 deletions
35
src/controllers/customer-branch-controller.ts
Normal file
35
src/controllers/customer-branch-controller.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import { Prisma, Status } from "@prisma/client";
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Path,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
Request,
|
||||
Route,
|
||||
Security,
|
||||
Tags,
|
||||
} from "tsoa";
|
||||
import { RequestWithUser } from "../interfaces/user";
|
||||
import prisma from "../db";
|
||||
import HttpStatus from "../interfaces/http-status";
|
||||
import HttpError from "../interfaces/http-error";
|
||||
import minio from "../services/minio";
|
||||
|
||||
if (!process.env.MINIO_BUCKET) {
|
||||
throw Error("Require MinIO bucket.");
|
||||
}
|
||||
|
||||
const MINIO_BUCKET = process.env.MINIO_BUCKET;
|
||||
|
||||
function imageLocation(id: string) {
|
||||
return `employee/profile-img-${id}`;
|
||||
}
|
||||
@Route("api/customer-branch")
|
||||
@Tags("Customer Branch")
|
||||
@Security("keycloak")
|
||||
export class CustomerBranchController extends Controller {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue