feat(app): add announcements, feedback, settings (stage 5)
This commit is contained in:
32
app-frontend/src/api/settings.js
Normal file
32
app-frontend/src/api/settings.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import { publicApi } from './http'
|
||||
|
||||
export async function fetchUserEmail() {
|
||||
const { data } = await publicApi.get('/user/email')
|
||||
return data
|
||||
}
|
||||
|
||||
export async function bindEmail(payload) {
|
||||
const { data } = await publicApi.post('/user/bind-email', payload)
|
||||
return data
|
||||
}
|
||||
|
||||
export async function unbindEmail() {
|
||||
const { data } = await publicApi.post('/user/unbind-email', {})
|
||||
return data
|
||||
}
|
||||
|
||||
export async function fetchEmailNotify() {
|
||||
const { data } = await publicApi.get('/user/email-notify')
|
||||
return data
|
||||
}
|
||||
|
||||
export async function updateEmailNotify(payload) {
|
||||
const { data } = await publicApi.post('/user/email-notify', payload)
|
||||
return data
|
||||
}
|
||||
|
||||
export async function changePassword(payload) {
|
||||
const { data } = await publicApi.post('/user/password', payload)
|
||||
return data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user