We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa2c9ec commit bd26fc5Copy full SHA for bd26fc5
src/services/user.service.js
@@ -12,12 +12,22 @@ const save = async user => {
12
13
const login = async user => {
14
try {
15
- const body = await api.post('/auth/login', user)
+ const res = await api.post('/auth/login', user)
16
17
- return body
+ return res
18
} catch (error) {
19
return error
20
}
21
22
23
-export default { save, login }
+const validate = async () => {
24
+ try {
25
+ const res = await api.post('/auth/refresh')
26
+
27
28
+ } catch (error) {
29
+ return error
30
+ }
31
+}
32
33
+export default { save, login, validate }
0 commit comments