mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
add Preferences modal(30%done) & move some modules (actions, reducer, socket, store -> lib/~)
This commit is contained in:
20
lib/api.js
20
lib/api.js
@@ -17,6 +17,24 @@ export function signup (input) {
|
||||
.send(input)
|
||||
}
|
||||
|
||||
export function updateUserInfo (input) {
|
||||
return request
|
||||
.put(API_URL + 'auth/user')
|
||||
.set({
|
||||
Authorization: 'Bearer ' + auth.token()
|
||||
})
|
||||
.send(input)
|
||||
}
|
||||
|
||||
export function updatePassword (input) {
|
||||
return request
|
||||
.post(API_URL + 'auth/password')
|
||||
.set({
|
||||
Authorization: 'Bearer ' + auth.token()
|
||||
})
|
||||
.send(input)
|
||||
}
|
||||
|
||||
export function fetchCurrentUser () {
|
||||
return request
|
||||
.get(API_URL + 'auth/user')
|
||||
@@ -113,6 +131,8 @@ export function sendEmail (input) {
|
||||
export default {
|
||||
login,
|
||||
signup,
|
||||
updateUserInfo,
|
||||
updatePassword,
|
||||
fetchCurrentUser,
|
||||
fetchArticles,
|
||||
createArticle,
|
||||
|
||||
Reference in New Issue
Block a user