mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-25 03:58:08 +09:00
8d94a6a8df
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
15 lines
299 B
TypeScript
15 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);
|
|
}
|
|
}
|