重构鉴权逻辑,新增中间件刷新令牌,授权接口统一后处理无授权跳转
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use server'
|
||||
|
||||
import {callByUser} from '@/actions/base'
|
||||
import {callByUser, callPublic} from '@/actions/base'
|
||||
|
||||
export async function RechargeByAlipay(props: {
|
||||
amount: number
|
||||
@@ -31,3 +31,23 @@ export async function RechargeByWechatConfirm(props: {
|
||||
}) {
|
||||
return callByUser('/api/user/recharge/confirm/wechat', props)
|
||||
}
|
||||
|
||||
export async function Identify(props: {
|
||||
type: number
|
||||
name: string
|
||||
iden_no: string
|
||||
}) {
|
||||
return await callByUser<{
|
||||
identified: boolean
|
||||
target: string
|
||||
}>('/api/user/identify', props)
|
||||
}
|
||||
|
||||
export async function IdentifyCallback(props: {
|
||||
id: string
|
||||
}) {
|
||||
return await callPublic<{
|
||||
success: boolean
|
||||
message: string
|
||||
}>('/api/user/identify/callback', props)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user