Merge pull request #6 from dx-tan/dev/sbt

Dev/sbt
This commit is contained in:
Đỗ Xuân Tân 2023-12-07 17:26:56 +07:00 committed by GitHub Enterprise
commit 323acbce64
4 changed files with 12 additions and 10 deletions

6
.gitignore vendored
View File

@ -14,3 +14,9 @@ __pycache__
migrations/
test/
._git/
sdsvkvu_/
cope2n-api-/
media/
postgres_data/
curl.md
cope2n-api/fwd_api/commands/init_database.py

View File

@ -13,11 +13,11 @@ USER node
###################
FROM node:16-alpine AS build
WORKDIR /app/
ENV NODE_ENV production
COPY --chown=node:node package*.json ./
COPY --chown=node:node --from=development /app/node_modules ./node_modules
COPY --chown=node:node . .
RUN npm run build
ENV NODE_ENV production
RUN npm ci --only=production && npm cache clean --force
USER node

View File

@ -2,11 +2,7 @@ import axios, { AxiosError, HttpStatusCode } from 'axios';
import { TOKEN_KEY } from '../consts';
import { getLocale } from '../i18n';
const BASE_PATH =
process.env.NODE_ENV === 'production'
? `${process.env.VITE_API_BASE_URL}/api`
: '/api';
const BASE_PATH = '/api';
export const API = axios.create({
baseURL: BASE_PATH,
withCredentials: false,

View File

@ -23,11 +23,11 @@ curl -X 'POST' \
-H 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6InhodXllbiIsImV4cGlyZWRfYXQiOiIxNC8xMC8yMDM0IDAyOjEyOjIyIiwiaW50ZXJuYWxfaWQiOjM2LCJzdGF0dXMiOjEsInN1YnNjcmlwdGlvbl9pZCI6MzN9.M4McUHsRmcO7X3fa4AlQmmzx_QrHjS2TbwqO9D7JSA73yaqBajpRUTos-wGmX-Sor8YNvd6TtVZOzaNqWFKQaw' \
-H 'Content-Type: multipart/form-data' \
-H 'X-CSRFTOKEN: 9iW1pPLUUtYFzBpwTaLgUSfCaQQBZ9uvfsTjwDV1OuPBGhAKUOkiyhLFuWkP33ta' \
-F 'imei_files=@"/mnt/hdd4T/TannedCung/OCR/FI-SBT-demo/test_images/handsomeian@gmail.com TV.jpg";type=image/jpeg' \
-F 'imei_files=@"/mnt/hdd4T/TannedCung/OCR/FI-SBT-demo/test_images/handsomeian@gmail.com RS.png";type=image/png' \
-F 'invoice_file=@"/mnt/hdd4T/TannedCung/OCR/FI-SBT-demo/test_images/handsomeian@gmail.com TV.jpg";type=image/jpeg' \
-F 'imei_files=@"./test_images/handsomeian@gmail.com TV.jpg";type=image/jpeg' \
-F 'imei_files=@"./test_images/handsomeian@gmail.com RS.png";type=image/png' \
-F 'invoice_file=@"./test_images/Invoice.jpg";type=image/jpeg' \
-F 'redemption_ID="12"'
curl --location 'http://42.96.42.13:9880/api/ctel/result/SAP9f9da237887844f6baf286d2d81c57f4/' \
curl --location 'http://42.96.42.13:9880/api/ctel/result/SAP659c495e8d684a779527c01345f248c0/' \
--header 'accept: */*' \
--header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6InhodXllbiIsImV4cGlyZWRfYXQiOiIxNC8xMC8yMDM0IDAyOjEyOjIyIiwiaW50ZXJuYWxfaWQiOjM2LCJzdGF0dXMiOjEsInN1YnNjcmlwdGlvbl9pZCI6MzN9.M4McUHsRmcO7X3fa4AlQmmzx_QrHjS2TbwqO9D7JSA73yaqBajpRUTos-wGmX-Sor8YNvd6TtVZOzaNqWFKQaw'