Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ESYTD
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Дияр Амангельды
ESYTD
Commits
58a51d68
Commit
58a51d68
authored
Jul 31, 2024
by
Merekeyev Dias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Boris fixed cors problem, what a nice lad
parent
cb5ab658
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
13 deletions
+12
-13
src/pages/AuthPage/AuthPage.tsx
src/pages/AuthPage/AuthPage.tsx
+1
-1
src/store/api/mainApi.tsx
src/store/api/mainApi.tsx
+0
-1
src/store/api/manualApi.ts
src/store/api/manualApi.ts
+1
-1
src/store/api/organizationApi.ts
src/store/api/organizationApi.ts
+4
-4
src/store/api/requestApi.ts
src/store/api/requestApi.ts
+3
-3
vite.config.ts
vite.config.ts
+3
-3
No files found.
src/pages/AuthPage/AuthPage.tsx
View file @
58a51d68
...
@@ -13,7 +13,7 @@ const AuthPage: React.FC = () => {
...
@@ -13,7 +13,7 @@ const AuthPage: React.FC = () => {
const
handleLogin
=
async
()
=>
{
const
handleLogin
=
async
()
=>
{
try
{
try
{
const
response
=
await
fetch
(
'
http://77.243.80.217:8080
/esutd/api/organizations/list
'
,
{
const
response
=
await
fetch
(
'
/esutd/api/organizations/list
'
,
{
headers
:
{
headers
:
{
'
Authorization
'
:
`Bearer
${
token
}
`
,
'
Authorization
'
:
`Bearer
${
token
}
`
,
},
},
...
...
src/store/api/mainApi.tsx
View file @
58a51d68
...
@@ -3,7 +3,6 @@ import { RootState } from '@/main';
...
@@ -3,7 +3,6 @@ import { RootState } from '@/main';
import
{
notification
}
from
'
antd
'
;
import
{
notification
}
from
'
antd
'
;
const
baseQuery
=
fetchBaseQuery
({
const
baseQuery
=
fetchBaseQuery
({
baseUrl
:
'
http://77.243.80.217/esutd/api
'
,
prepareHeaders
:
(
headers
,
{
getState
})
=>
{
prepareHeaders
:
(
headers
,
{
getState
})
=>
{
const
accessToken
=
(
getState
()
as
RootState
).
auth
.
token
;
const
accessToken
=
(
getState
()
as
RootState
).
auth
.
token
;
...
...
src/store/api/manualApi.ts
View file @
58a51d68
...
@@ -4,7 +4,7 @@ export const manualApiSlice = apiSlice.injectEndpoints({
...
@@ -4,7 +4,7 @@ export const manualApiSlice = apiSlice.injectEndpoints({
endpoints
:
(
builder
)
=>
({
endpoints
:
(
builder
)
=>
({
updateDictionary
:
builder
.
mutation
({
updateDictionary
:
builder
.
mutation
({
query
:
(
codes
)
=>
({
query
:
(
codes
)
=>
({
url
:
'
dictionary/update
'
,
url
:
'
/esutd/api/
dictionary/update
'
,
method
:
'
POST
'
,
method
:
'
POST
'
,
body
:
codes
body
:
codes
}),
invalidatesTags
:
[{
type
:
"
manuals
"
,
id
:
"
MAN_LIST
"
}]
}),
invalidatesTags
:
[{
type
:
"
manuals
"
,
id
:
"
MAN_LIST
"
}]
...
...
src/store/api/organizationApi.ts
View file @
58a51d68
...
@@ -17,16 +17,16 @@ interface Organization {
...
@@ -17,16 +17,16 @@ interface Organization {
export
const
organizationApiSlice
=
apiSlice
.
injectEndpoints
({
export
const
organizationApiSlice
=
apiSlice
.
injectEndpoints
({
endpoints
:
(
builder
)
=>
({
endpoints
:
(
builder
)
=>
({
getOrganizations
:
builder
.
query
<
Organization
[],
void
>
({
getOrganizations
:
builder
.
query
<
Organization
[],
void
>
({
query
:
()
=>
'
organizations/list
'
,
query
:
()
=>
'
/esutd/api/
organizations/list
'
,
providesTags
:
[{
type
:
"
organizations
"
,
id
:
"
ORG_LIST
"
}],
providesTags
:
[{
type
:
"
organizations
"
,
id
:
"
ORG_LIST
"
}],
}),
}),
getOrganization
:
builder
.
query
<
Organization
,
string
>
({
getOrganization
:
builder
.
query
<
Organization
,
string
>
({
query
:
(
orgId
)
=>
`organizations/info?id=
${
orgId
}
`
,
query
:
(
orgId
)
=>
`
/esutd/api/
organizations/info?id=
${
orgId
}
`
,
providesTags
:
(
_
,
__
,
arg
)
=>
[{
type
:
"
organizations
"
,
id
:
arg
}]
providesTags
:
(
_
,
__
,
arg
)
=>
[{
type
:
"
organizations
"
,
id
:
arg
}]
}),
}),
editOrganization
:
builder
.
mutation
<
Organization
,
Partial
<
Organization
>>
({
editOrganization
:
builder
.
mutation
<
Organization
,
Partial
<
Organization
>>
({
query
:
(
initialOrg
)
=>
({
query
:
(
initialOrg
)
=>
({
url
:
`organizations/save?id=
${
initialOrg
.
id
}
`
,
url
:
`
/esutd/api/
organizations/save?id=
${
initialOrg
.
id
}
`
,
method
:
'
POST
'
,
method
:
'
POST
'
,
body
:
initialOrg
,
body
:
initialOrg
,
}),
}),
...
@@ -34,7 +34,7 @@ export const organizationApiSlice = apiSlice.injectEndpoints({
...
@@ -34,7 +34,7 @@ export const organizationApiSlice = apiSlice.injectEndpoints({
}),
}),
deleteOrganization
:
builder
.
mutation
<
{
success
:
boolean
;
code
:
string
},
string
>
({
deleteOrganization
:
builder
.
mutation
<
{
success
:
boolean
;
code
:
string
},
string
>
({
query
:
(
orgCode
)
=>
({
query
:
(
orgCode
)
=>
({
url
:
`organizations/delete?code=
${
orgCode
}
`
,
url
:
`
/esutd/api/
organizations/delete?code=
${
orgCode
}
`
,
method
:
'
POST
'
method
:
'
POST
'
}),
}),
invalidatesTags
:
[{
type
:
"
organizations
"
,
id
:
"
ORG_LIST
"
}],
invalidatesTags
:
[{
type
:
"
organizations
"
,
id
:
"
ORG_LIST
"
}],
...
...
src/store/api/requestApi.ts
View file @
58a51d68
...
@@ -29,19 +29,19 @@ const getRequestsParams = {
...
@@ -29,19 +29,19 @@ const getRequestsParams = {
export
const
requestApiSlice
=
apiSlice
.
injectEndpoints
({
export
const
requestApiSlice
=
apiSlice
.
injectEndpoints
({
endpoints
:
(
builder
)
=>
({
endpoints
:
(
builder
)
=>
({
getRequests
:
builder
.
query
<
RequestsResponse
,
void
>
({
getRequests
:
builder
.
query
<
RequestsResponse
,
void
>
({
query
:
()
=>
`requests/list?pageNumber=
${
getRequestsParams
.
pageNumber
}
&pageSize=
${
getRequestsParams
.
pageSize
}
`
,
query
:
()
=>
`
/esutd/api/
requests/list?pageNumber=
${
getRequestsParams
.
pageNumber
}
&pageSize=
${
getRequestsParams
.
pageSize
}
`
,
providesTags
:
[{
type
:
"
requests
"
,
id
:
"
REQ_LIST
"
}],
providesTags
:
[{
type
:
"
requests
"
,
id
:
"
REQ_LIST
"
}],
}),
}),
addNewRequest
:
builder
.
mutation
<
Request
,
Partial
<
Request
>>
({
addNewRequest
:
builder
.
mutation
<
Request
,
Partial
<
Request
>>
({
query
:
(
initialReq
)
=>
({
query
:
(
initialReq
)
=>
({
url
:
'
requests/save
'
,
url
:
'
/esutd/api/
requests/save
'
,
method
:
'
POST
'
,
method
:
'
POST
'
,
body
:
initialReq
,
body
:
initialReq
,
}),
}),
invalidatesTags
:
[{
type
:
"
requests
"
,
id
:
"
REQ_LIST
"
}],
invalidatesTags
:
[{
type
:
"
requests
"
,
id
:
"
REQ_LIST
"
}],
}),
}),
resendRequest
:
builder
.
query
({
resendRequest
:
builder
.
query
({
query
:
(
reqId
)
=>
`requests/resent?id=
${
reqId
}
`
,
query
:
(
reqId
)
=>
`
/esutd/api/
requests/resent?id=
${
reqId
}
`
,
providesTags
:
(
_
,
__
,
arg
)
=>
[{
type
:
"
requests
"
,
id
:
arg
}]
providesTags
:
(
_
,
__
,
arg
)
=>
[{
type
:
"
requests
"
,
id
:
arg
}]
})
})
})
})
...
...
vite.config.ts
View file @
58a51d68
...
@@ -10,11 +10,11 @@ export default defineConfig({
...
@@ -10,11 +10,11 @@ export default defineConfig({
},
},
server
:
{
server
:
{
proxy
:
{
proxy
:
{
'
/
api
'
:
{
'
/
esutd
'
:
{
target
:
'
http://77.243.80.217:8080
'
,
target
:
'
http://77.243.80.217:8080
'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
api/
,
''
),
secure
:
false
,
secure
:
false
,
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
api/
,
''
),
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment