Refine admin workflows and team access
This commit is contained in:
@@ -4,12 +4,10 @@ import { AUTH_TOKEN_KEY, api } from '../lib/api'
|
||||
import { ApiRequestError } from '../lib/http'
|
||||
import type {
|
||||
AuthSession,
|
||||
BindTeamTwitchPayload,
|
||||
ChangePasswordPayload,
|
||||
DemoLoginPayload,
|
||||
LoginPayload,
|
||||
TeamLoginPayload,
|
||||
TeamTwitchLoginPayload,
|
||||
TwitchAuthorizePayload,
|
||||
} from '../types/awards'
|
||||
|
||||
@@ -112,16 +110,6 @@ export const useAuthStore = defineStore('auth', {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async teamTwitchLogin(payload: TeamTwitchLoginPayload) {
|
||||
this.loading = true
|
||||
try {
|
||||
const session = await api.teamTwitchLogin(payload)
|
||||
this.session = session
|
||||
writeStoredToken(session.sessionToken)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async changePassword(payload: ChangePasswordPayload) {
|
||||
this.loading = true
|
||||
try {
|
||||
@@ -132,16 +120,6 @@ export const useAuthStore = defineStore('auth', {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async bindTeamTwitch(payload: BindTeamTwitchPayload) {
|
||||
this.loading = true
|
||||
try {
|
||||
const session = await api.bindTeamTwitch(payload)
|
||||
this.session = session
|
||||
writeStoredToken(session.sessionToken)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async startTwitchAuthorization(payload: Omit<TwitchAuthorizePayload, 'frontendOrigin'>) {
|
||||
this.loading = true
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user