Moved CollectionPost type to it's own file

refs https://github.com/TryGhost/Arch/issues/41

- This type has to be reused in other class, so best way to do it is having it separated into it's own file
This commit is contained in:
Naz 2023-07-18 19:42:25 +08:00 committed by naz
parent f542c86ac6
commit 939a8fef33
2 changed files with 8 additions and 6 deletions

View File

@ -2,6 +2,7 @@ import {UniqueChecker} from './UniqueChecker';
import {ValidationError} from '@tryghost/errors';
import tpl from '@tryghost/tpl';
import nql = require('@tryghost/nql');
import {CollectionPost} from './CollectionPost';
import ObjectID from 'bson-objectid';
@ -16,12 +17,6 @@ const messages = {
slugMustBeUnique: 'Slug must be unique'
};
type CollectionPost = {
id: string;
featured?: boolean;
published_at?: Date;
}
export class Collection {
id: string;
title: string;

View File

@ -0,0 +1,7 @@
// eslint-disable-next-line ghost/filenames/match-regex
export type CollectionPost = {
id: string;
featured?: boolean;
published_at?: Date;
tags: string[];
};