fix: isolate play profiles per user

This commit is contained in:
ShukeBta
2026-05-29 15:56:51 +08:00
parent 633a8cf715
commit 99fe7329f7
13 changed files with 235 additions and 86 deletions
+2 -5
View File
@@ -23,12 +23,9 @@ export interface PlayProfilePINVerifyResponse {
expires_at: string
}
// playProfilesAPI wraps /play-profiles. The admin variant adds ?all=true.
// playProfilesAPI wraps caller-scoped /play-profiles.
export const playProfilesAPI = {
list: (all = false) =>
api
.get<PlayProfile[]>('/play-profiles', { params: all ? { all: 'true' } : {} })
.then((r) => r.data),
list: () => api.get<PlayProfile[]>('/play-profiles').then((r) => r.data),
create: (input: PlayProfileInput) =>
api.post<PlayProfile>('/play-profiles', input).then((r) => r.data),