commit
323acbce64
6
.gitignore
vendored
6
.gitignore
vendored
@ -14,3 +14,9 @@ __pycache__
|
|||||||
migrations/
|
migrations/
|
||||||
test/
|
test/
|
||||||
._git/
|
._git/
|
||||||
|
sdsvkvu_/
|
||||||
|
cope2n-api-/
|
||||||
|
media/
|
||||||
|
postgres_data/
|
||||||
|
curl.md
|
||||||
|
cope2n-api/fwd_api/commands/init_database.py
|
||||||
|
@ -13,11 +13,11 @@ USER node
|
|||||||
###################
|
###################
|
||||||
FROM node:16-alpine AS build
|
FROM node:16-alpine AS build
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
ENV NODE_ENV production
|
||||||
COPY --chown=node:node package*.json ./
|
COPY --chown=node:node package*.json ./
|
||||||
COPY --chown=node:node --from=development /app/node_modules ./node_modules
|
COPY --chown=node:node --from=development /app/node_modules ./node_modules
|
||||||
COPY --chown=node:node . .
|
COPY --chown=node:node . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
ENV NODE_ENV production
|
|
||||||
RUN npm ci --only=production && npm cache clean --force
|
RUN npm ci --only=production && npm cache clean --force
|
||||||
USER node
|
USER node
|
||||||
|
|
||||||
|
@ -2,11 +2,7 @@ import axios, { AxiosError, HttpStatusCode } from 'axios';
|
|||||||
import { TOKEN_KEY } from '../consts';
|
import { TOKEN_KEY } from '../consts';
|
||||||
import { getLocale } from '../i18n';
|
import { getLocale } from '../i18n';
|
||||||
|
|
||||||
const BASE_PATH =
|
const BASE_PATH = '/api';
|
||||||
process.env.NODE_ENV === 'production'
|
|
||||||
? `${process.env.VITE_API_BASE_URL}/api`
|
|
||||||
: '/api';
|
|
||||||
|
|
||||||
export const API = axios.create({
|
export const API = axios.create({
|
||||||
baseURL: BASE_PATH,
|
baseURL: BASE_PATH,
|
||||||
withCredentials: false,
|
withCredentials: false,
|
||||||
|
@ -23,11 +23,11 @@ curl -X 'POST' \
|
|||||||
-H 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6InhodXllbiIsImV4cGlyZWRfYXQiOiIxNC8xMC8yMDM0IDAyOjEyOjIyIiwiaW50ZXJuYWxfaWQiOjM2LCJzdGF0dXMiOjEsInN1YnNjcmlwdGlvbl9pZCI6MzN9.M4McUHsRmcO7X3fa4AlQmmzx_QrHjS2TbwqO9D7JSA73yaqBajpRUTos-wGmX-Sor8YNvd6TtVZOzaNqWFKQaw' \
|
-H 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6InhodXllbiIsImV4cGlyZWRfYXQiOiIxNC8xMC8yMDM0IDAyOjEyOjIyIiwiaW50ZXJuYWxfaWQiOjM2LCJzdGF0dXMiOjEsInN1YnNjcmlwdGlvbl9pZCI6MzN9.M4McUHsRmcO7X3fa4AlQmmzx_QrHjS2TbwqO9D7JSA73yaqBajpRUTos-wGmX-Sor8YNvd6TtVZOzaNqWFKQaw' \
|
||||||
-H 'Content-Type: multipart/form-data' \
|
-H 'Content-Type: multipart/form-data' \
|
||||||
-H 'X-CSRFTOKEN: 9iW1pPLUUtYFzBpwTaLgUSfCaQQBZ9uvfsTjwDV1OuPBGhAKUOkiyhLFuWkP33ta' \
|
-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=@"./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 'imei_files=@"./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 'invoice_file=@"./test_images/Invoice.jpg";type=image/jpeg' \
|
||||||
-F 'redemption_ID="12"'
|
-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 'accept: */*' \
|
||||||
--header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6InhodXllbiIsImV4cGlyZWRfYXQiOiIxNC8xMC8yMDM0IDAyOjEyOjIyIiwiaW50ZXJuYWxfaWQiOjM2LCJzdGF0dXMiOjEsInN1YnNjcmlwdGlvbl9pZCI6MzN9.M4McUHsRmcO7X3fa4AlQmmzx_QrHjS2TbwqO9D7JSA73yaqBajpRUTos-wGmX-Sor8YNvd6TtVZOzaNqWFKQaw'
|
--header 'Authorization: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6InhodXllbiIsImV4cGlyZWRfYXQiOiIxNC8xMC8yMDM0IDAyOjEyOjIyIiwiaW50ZXJuYWxfaWQiOjM2LCJzdGF0dXMiOjEsInN1YnNjcmlwdGlvbl9pZCI6MzN9.M4McUHsRmcO7X3fa4AlQmmzx_QrHjS2TbwqO9D7JSA73yaqBajpRUTos-wGmX-Sor8YNvd6TtVZOzaNqWFKQaw'
|
Loading…
Reference in New Issue
Block a user