36 lines
748 B
TypeScript
36 lines
748 B
TypeScript
|
|
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 {
|
||
|
|
}
|