mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-01 03:56:38 +08:00
fix: secure adult visibility and telegram bot access
This commit is contained in:
@@ -38,6 +38,6 @@ export const playProfilesAPI = {
|
||||
.post<PlayProfilePINVerifyResponse>(`/play-profiles/${id}/verify-pin`, { pin })
|
||||
.then((r) => r.data),
|
||||
|
||||
remove: (id: string) =>
|
||||
api.delete(`/play-profiles/${id}`).then((r) => r.data),
|
||||
remove: (id: string, proof?: { pin?: string; password?: string }) =>
|
||||
api.delete(`/play-profiles/${id}`, { data: proof ?? {} }).then((r) => r.data),
|
||||
}
|
||||
|
||||
@@ -2,7 +2,14 @@ import { api } from './client'
|
||||
import type { User } from '../types'
|
||||
|
||||
export const profileAPI = {
|
||||
update: (patch: { email?: string; avatar_url?: string }) =>
|
||||
update: (patch: {
|
||||
username?: string
|
||||
nickname?: string
|
||||
email?: string
|
||||
avatar_url?: string
|
||||
hide_adult?: boolean
|
||||
password?: string
|
||||
}) =>
|
||||
api.patch<User>('/me', patch).then((r) => r.data),
|
||||
|
||||
adminUpdateRole: (id: string, role: 'admin' | 'user') =>
|
||||
|
||||
Reference in New Issue
Block a user