Revize 8040f287
Přidáno uživatelem Michal Schwob před více než 1 rok
package-lock.json | ||
---|---|---|
13 | 13 |
"@react-navigation/native": "^6.1.6", |
14 | 14 |
"@react-navigation/native-stack": "^6.9.14", |
15 | 15 |
"@reduxjs/toolkit": "^1.9.3", |
16 |
"axios": "^1.3.4",
|
|
16 |
"axios": "^1.5.1",
|
|
17 | 17 |
"expo": "^49.0.13", |
18 | 18 |
"expo-splash-screen": "^0.20.5", |
19 | 19 |
"expo-status-bar": "~1.6.0", |
... | ... | |
7360 | 7360 |
} |
7361 | 7361 |
}, |
7362 | 7362 |
"node_modules/axios": { |
7363 |
"version": "1.3.4",
|
|
7364 |
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz",
|
|
7365 |
"integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==",
|
|
7363 |
"version": "1.5.1",
|
|
7364 |
"resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz",
|
|
7365 |
"integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==",
|
|
7366 | 7366 |
"dependencies": { |
7367 | 7367 |
"follow-redirects": "^1.15.0", |
7368 | 7368 |
"form-data": "^4.0.0", |
... | ... | |
21232 | 21232 |
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" |
21233 | 21233 |
}, |
21234 | 21234 |
"axios": { |
21235 |
"version": "1.3.4",
|
|
21236 |
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.4.tgz",
|
|
21237 |
"integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==",
|
|
21235 |
"version": "1.5.1",
|
|
21236 |
"resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz",
|
|
21237 |
"integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==",
|
|
21238 | 21238 |
"requires": { |
21239 | 21239 |
"follow-redirects": "^1.15.0", |
21240 | 21240 |
"form-data": "^4.0.0", |
package.json | ||
---|---|---|
14 | 14 |
"@react-navigation/native": "^6.1.6", |
15 | 15 |
"@react-navigation/native-stack": "^6.9.14", |
16 | 16 |
"@reduxjs/toolkit": "^1.9.3", |
17 |
"axios": "^1.3.4",
|
|
17 |
"axios": "^1.5.1",
|
|
18 | 18 |
"expo": "^49.0.13", |
19 | 19 |
"expo-splash-screen": "^0.20.5", |
20 | 20 |
"expo-status-bar": "~1.6.0", |
src/api/authservice.ts | ||
---|---|---|
1 | 1 |
import { axiosInstance } from "./api" |
2 |
import {Toast} from "native-base" |
|
2 | 3 |
|
3 | 4 |
export const loginRequest = async (username: string, password: string) => { |
4 | 5 |
return await axiosInstance.post( |
... | ... | |
11 | 12 |
} |
12 | 13 |
|
13 | 14 |
export const isAuthRequest = async () => { |
15 |
Toast.show({ |
|
16 |
title: `Checking auth ${axiosInstance.defaults.baseURL}`, |
|
17 |
duration: 10000 |
|
18 |
}) |
|
14 | 19 |
return await axiosInstance.get( |
15 | 20 |
"/isauth" |
16 | 21 |
) |
Také k dispozici: Unified diff
DEBUG: Added toast for in app debug
FIX: axios version updated
re #10822