feat: set api key name

This commit is contained in:
karishmas6
2024-10-03 03:59:02 +05:30
parent dfd7097c77
commit af1a07bf14

View File

@@ -5,6 +5,7 @@ interface UserAttributes {
id: number;
email: string;
password: string;
api_key_name?: string | null;
api_key?: string | null;
proxy_url?: string | null;
proxy_username?: string | null;
@@ -18,6 +19,7 @@ class User extends Model<UserAttributes, UserCreationAttributes> implements User
public id!: number;
public email!: string;
public password!: string;
public api_key_name!: string | null;
public api_key!: string | null;
public proxy_url!: string | null;
public proxy_username!: string | null;
@@ -43,6 +45,11 @@ User.init(
type: DataTypes.STRING,
allowNull: false,
},
api_key_name: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: 'Maxun API Key',
},
api_key: {
type: DataTypes.STRING,
allowNull: true,