Skip to content

Commit bd26fc5

Browse files
committed
♻️ Change variables names
1 parent fa2c9ec commit bd26fc5

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/services/user.service.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,22 @@ const save = async user => {
1212

1313
const login = async user => {
1414
try {
15-
const body = await api.post('/auth/login', user)
15+
const res = await api.post('/auth/login', user)
1616

17-
return body
17+
return res
1818
} catch (error) {
1919
return error
2020
}
2121
}
2222

23-
export default { save, login }
23+
const validate = async () => {
24+
try {
25+
const res = await api.post('/auth/refresh')
26+
27+
return res
28+
} catch (error) {
29+
return error
30+
}
31+
}
32+
33+
export default { save, login, validate }

0 commit comments

Comments
 (0)