Added git hooks

This commit is contained in:
Sebastian Seedorf
2022-08-18 13:45:05 +02:00
parent 07469dde88
commit b97c922ff3
7 changed files with 42 additions and 26 deletions

View File

@@ -16,7 +16,10 @@ export type InsertMeta<T> = T & {
type GroupFilter = Filter<InsertMeta<GroupData>>
export async function setData(uuid: string|undefined, data: GroupData): Promise<string | undefined> {
export async function setData(
uuid: string | undefined,
data: GroupData
): Promise<string | undefined> {
const collection = (await database.resolve())?.collection('setups')
if (!collection) return
if (!uuid) {

View File

@@ -43,15 +43,16 @@ export function addSchemas() {
type: 'object',
required: ['groups', 'ignored', 'base'],
properties: {
groups: { type: 'object',
groups: {
type: 'object',
additionalProperties: {
type: 'object',
required: ['name', 'exports', 'malls'],
properties: {
name: {type: 'string', minLength: 1},
exports: {type: 'array', items: {type: 'string', minLength: 3}},
malls: {type: 'array', items: {type: 'string', minLength: 3}}
},
name: { type: 'string', minLength: 1 },
exports: { type: 'array', items: { type: 'string', minLength: 3 } },
malls: { type: 'array', items: { type: 'string', minLength: 3 } }
}
}
},
ignored: { type: 'array', items: { type: 'string', minLength: 3 } },