Fix security
This commit is contained in:
@@ -1,20 +1,25 @@
|
||||
// User types
|
||||
export type UserRole = 'user' | 'admin'
|
||||
|
||||
export interface User {
|
||||
// Public user info (visible to other users)
|
||||
export interface UserPublic {
|
||||
id: number
|
||||
login: string
|
||||
nickname: string
|
||||
avatar_url: string | null
|
||||
role: UserRole
|
||||
telegram_id: number | null
|
||||
telegram_username: string | null
|
||||
telegram_first_name: string | null
|
||||
telegram_last_name: string | null
|
||||
telegram_avatar_url: string | null
|
||||
created_at: string
|
||||
}
|
||||
|
||||
// Full user info (only for own profile from /auth/me)
|
||||
export interface User extends UserPublic {
|
||||
login?: string // Only visible to self
|
||||
telegram_id?: number | null // Only visible to self
|
||||
telegram_username?: string | null // Only visible to self
|
||||
telegram_first_name?: string | null // Only visible to self
|
||||
telegram_last_name?: string | null // Only visible to self
|
||||
}
|
||||
|
||||
export interface TokenResponse {
|
||||
access_token: string
|
||||
token_type: string
|
||||
|
||||
Reference in New Issue
Block a user