feat: long instance descriptions (#5)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/** @type {import('typeorm').MigrationInterface} */
|
||||
export class AddLongdescriptionToMeta1744316999807 {
|
||||
name = 'AddLongdescriptionToMeta1744316999807'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "longDescription" character varying(4096)`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "longDescription"`);
|
||||
}
|
||||
}
|
||||
@@ -75,6 +75,7 @@ export class MetaEntityService {
|
||||
shortName: instance.shortName,
|
||||
uri: this.config.url,
|
||||
description: instance.description,
|
||||
longDescription: instance.longDescription,
|
||||
langs: instance.langs,
|
||||
tosUrl: instance.termsOfServiceUrl,
|
||||
repositoryUrl: instance.repositoryUrl,
|
||||
|
||||
@@ -211,6 +211,12 @@ export class MiMeta {
|
||||
})
|
||||
public registrationWord: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 5128,
|
||||
nullable: true,
|
||||
})
|
||||
public longDescription: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024,
|
||||
nullable: true,
|
||||
|
||||
@@ -497,6 +497,10 @@ export const meta = {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
longDescription: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
disableRegistration: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
@@ -654,6 +658,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
shortName: instance.shortName,
|
||||
uri: this.config.url,
|
||||
description: instance.description,
|
||||
longDescription: instance.longDescription,
|
||||
langs: instance.langs,
|
||||
tosUrl: instance.termsOfServiceUrl,
|
||||
repositoryUrl: instance.repositoryUrl,
|
||||
|
||||
@@ -67,6 +67,7 @@ export const paramDef = {
|
||||
name: { type: 'string', nullable: true },
|
||||
shortName: { type: 'string', nullable: true },
|
||||
description: { type: 'string', nullable: true },
|
||||
longDescription: { type:'string', nullable: true },
|
||||
defaultLightTheme: { type: 'string', nullable: true },
|
||||
defaultDarkTheme: { type: 'string', nullable: true },
|
||||
defaultLike: { type: 'string' },
|
||||
@@ -331,6 +332,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
set.description = ps.description;
|
||||
}
|
||||
|
||||
if (ps.longDescription !== undefined) {
|
||||
set.longDescription = ps.longDescription;
|
||||
}
|
||||
|
||||
if (ps.defaultLightTheme !== undefined) {
|
||||
set.defaultLightTheme = ps.defaultLightTheme;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user