dify/web/models/user.ts

18 lines
297 B
TypeScript
Raw Permalink Normal View History

2023-05-15 08:51:32 +08:00
export type User = {
id: string
firstName: string
lastName: string
name: string
phone: string
username: string
email: string
avatar: string
}
export type UserResponse = {
users: User[]
}
export const fetchUsers = (url: string) =>
fetch(url).then<UserResponse>(r => r.json())