mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 15:33:09 +02:00
13 lines
260 B
TypeScript
13 lines
260 B
TypeScript
import { Meta } from '../models/entities/meta';
|
|
import { Metas } from '../models';
|
|
|
|
export default async function(): Promise<Meta> {
|
|
const meta = await Metas.findOne();
|
|
if (meta) {
|
|
return meta;
|
|
} else {
|
|
return Metas.save({
|
|
id: 'x'
|
|
} as Meta);
|
|
}
|
|
}
|