mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-01-26 17:36:28 -07:00
8d94a6a8df
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
14 lines
299 B
TypeScript
14 lines
299 B
TypeScript
import { Meta } from '../models/entities/meta';
|
|
import { Metas } from '../models';
|
|
import { genId } from './gen-id';
|
|
|
|
export default async function(): Promise<Meta> {
|
|
const meta = await Metas.findOne();
|
|
if (meta) {
|
|
return meta;
|
|
} else {
|
|
return Metas.save({
|
|
id: genId(),
|
|
} as Meta);
|
|
}
|
|
}
|