Skip to content

Commit 1e5b62c

Browse files
authored
Sudo (#128)
chore: merging with sudo
2 parents cbc958e + 03e0ac1 commit 1e5b62c

File tree

23 files changed

+810
-52
lines changed

23 files changed

+810
-52
lines changed

.eslintrc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"jest": true
66
},
77
"extends": [
8-
"eslint:recommended",
9-
"plugin:react/recommended",
10-
"plugin:@typescript-eslint/recommended",
11-
"plugin:@typescript-eslint/recommended-requiring-type-checking",
8+
// "eslint:recommended",
9+
// "plugin:react/recommended",
10+
// "plugin:@typescript-eslint/recommended",
11+
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
1212
"prettier" // this rule should be the last
1313
],
1414
"overrides": [],

.husky/pre-commit

Lines changed: 0 additions & 4 deletions
This file was deleted.

docker-compose.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3.3'
2+
services:
3+
api:
4+
build:
5+
context: ./
6+
dockerfile: local.Dockerfile
7+
volumes:
8+
- ./:/app
9+
- ./.m2:/root/.m2
10+
working_dir: /app
11+
command: sh run.sh

package-lock.json

Lines changed: 156 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
"@testing-library/jest-dom": "^6.1.3",
88
"@testing-library/react": "^14.0.0",
99
"@testing-library/user-event": "^14.5.1",
10+
"@types/axios": "^0.14.0",
1011
"axios": "^1.6.2",
1112
"eslint-config-prettier": "^9.0.0",
1213
"react": "^18.2.0",
1314
"react-dom": "^18.2.0",
15+
"react-hot-toast": "^2.4.1",
16+
"react-query": "^3.39.3",
1417
"react-redux": "^8.1.3",
1518
"react-router-dom": "^6.16.0",
1619
"react-scripts": "^5.0.1",
1720
"react-simply-carousel": "^9.0.4",
21+
"redux": "^5.0.0",
1822
"redux-thunk": "^3.1.0",
1923
"web-vitals": "^3.5.0"
2024
},
@@ -56,6 +60,8 @@
5660
"@types/node": "^20.8.0",
5761
"@types/react": "^18.2.24",
5862
"@types/react-dom": "^18.2.8",
63+
"@types/react-query": "^1.2.9",
64+
"@types/react-redux": "^7.1.33",
5965
"@typescript-eslint/eslint-plugin": "^6.7.3",
6066
"@typescript-eslint/parser": "^6.7.3",
6167
"dotenv": "^16.3.1",

src/app/api/file.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1-
import axios from 'axios';
1+
import axios, { AxiosResponse } from 'axios';
22
import { BACKEND_URL } from 'envConstants';
33

4+
5+
export interface FileUpload{
6+
7+
message: string,
8+
isSuccessful: boolean,
9+
statusCode: number,
10+
11+
}
12+
13+
14+
15+
416
export const uploadIcon = async (
517
authorizationToken: string,
618
orgName: string,
719
file: File
8-
) => {
20+
):Promise<AxiosResponse<FileUpload>> => {
921
const url = BACKEND_URL + '/api/protected/file/upload/' + orgName;
1022
const formData = new FormData();
1123
formData.append('file', file);
12-
const respnse = await axios.post(url, formData, {
24+
const respnse = await axios.post<FileUpload>(url, formData, {
1325
headers: {
1426
Accept: 'application/json',
1527
Authorization: `Bearer ${authorizationToken}`,

0 commit comments

Comments
 (0)