chore: Tidy API key settings page
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
BelongsTo,
|
||||
ForeignKey,
|
||||
} from "sequelize-typescript";
|
||||
import { ApiKeyValidation } from "@shared/validations";
|
||||
import User from "./User";
|
||||
import ParanoidModel from "./base/ParanoidModel";
|
||||
import Fix from "./decorators/Fix";
|
||||
@@ -22,9 +23,9 @@ class ApiKey extends ParanoidModel<
|
||||
static prefix = "ol_api_";
|
||||
|
||||
@Length({
|
||||
min: 3,
|
||||
max: 255,
|
||||
msg: "Name must be between 3 and 255 characters",
|
||||
min: ApiKeyValidation.minNameLength,
|
||||
max: ApiKeyValidation.maxNameLength,
|
||||
msg: `Name must be between ${ApiKeyValidation.minNameLength} and ${ApiKeyValidation.maxNameLength} characters`,
|
||||
})
|
||||
@Column
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user