mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
Settings System (#46)
* feat(api): settings system Also includes /auth/me endpoint for ticket ch76 and OpenAPI 3.0 compatibility for ch77 * refactor(api): remove unused imports
This commit is contained in:
@@ -8,6 +8,10 @@ import {
|
||||
|
||||
@Entity()
|
||||
export class User {
|
||||
public static filterMany(users: User[]): Partial<User>[] {
|
||||
return users.map((u) => u.filter());
|
||||
}
|
||||
|
||||
@PrimaryGeneratedColumn()
|
||||
public id: number;
|
||||
|
||||
@@ -15,7 +19,7 @@ export class User {
|
||||
public email: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
public plexToken: string;
|
||||
public plexToken?: string;
|
||||
|
||||
@CreateDateColumn()
|
||||
public createdAt: Date;
|
||||
@@ -26,4 +30,13 @@ export class User {
|
||||
constructor(init?: Partial<User>) {
|
||||
Object.assign(this, init);
|
||||
}
|
||||
|
||||
public filter(): Partial<User> {
|
||||
return {
|
||||
id: this.id,
|
||||
email: this.email,
|
||||
createdAt: this.createdAt,
|
||||
updatedAt: this.updatedAt,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user