29 lines
790 B
TypeScript
29 lines
790 B
TypeScript
import type { PageRecord } from "@/lib/api"
|
|
import type { User } from "@/models/user"
|
|
import { callByUser } from "./base"
|
|
|
|
export async function getPageUsers(params: { page: number; size: number }) {
|
|
return callByUser<PageRecord<User>>("/api/admin/user/page", params)
|
|
}
|
|
|
|
export async function getPageUserPage(params: { page: number; size: number }) {
|
|
return callByUser<PageRecord<User>>("/api/admin/user/page/not-bind", params)
|
|
}
|
|
|
|
export async function bindAdmin(params: {
|
|
id: number
|
|
account?: string
|
|
name?: string
|
|
identified?: boolean
|
|
enabled?: boolean
|
|
assigned?: boolean
|
|
}) {
|
|
return callByUser("/api/admin/user/update/bind", {
|
|
user_id: params.id,
|
|
})
|
|
}
|
|
|
|
export async function getPageUser(params: object) {
|
|
return callByUser<User>("/api/admin/user/get", params)
|
|
}
|