diff --git a/src/plugins/api/apps.ts b/src/plugins/api/apps.ts index 0b5cd7d..76ce47c 100644 --- a/src/plugins/api/apps.ts +++ b/src/plugins/api/apps.ts @@ -66,6 +66,7 @@ function appsRoute(server: FastifyInstance('/api/register', options, async (request, reply) => { if (!server.database) return serverError(reply) - const { name, email, password, invitation: code } = request.body + const { name, email, password, requiresApproval, privacy, invitation: code } = request.body const id = normalize(request.body.id) const userContainer = containerFor(server.database.client, 'Users') @@ -163,8 +170,8 @@ function registerRoute(server: FastifyInstance(viewer) - return viewer }) } diff --git a/src/schemas.ts b/src/schemas.ts index e402e64..77aa809 100644 --- a/src/schemas.ts +++ b/src/schemas.ts @@ -54,6 +54,7 @@ export const appSchema: JSONSchema = { displayName: { type: 'string' }, imageUrl: { type: 'string' }, coverImageUrl: { type: 'string' }, + iconImageUrl: { type: 'string' }, about: { type: 'string' }, websiteUrl: { type: 'string' }, companyName: { type: 'string' }, @@ -81,13 +82,18 @@ export const selfSchema: JSONSchema = { }, }, installations: { - type: 'object', - properties: { - app: appSchema, - settings: { type: 'object' }, - created: { type: 'number' }, + type: 'array', + items: { + type: 'object', + properties: { + app: appSchema, + settings: { type: 'object' }, + created: { type: 'number' }, + }, }, }, + requiresApproval: { type: 'boolean' }, + privacy: { type: 'string' }, membership: { type: 'string' }, created: { type: 'number' }, }, diff --git a/src/types/collections.ts b/src/types/collections.ts index eec9803..12b785f 100644 --- a/src/types/collections.ts +++ b/src/types/collections.ts @@ -317,6 +317,7 @@ export interface AppRevision { name: string imageUrl?: string coverImageUrl?: string + iconImageUrl?: string about?: string websiteUrl?: string companyName?: string @@ -337,6 +338,7 @@ export interface App { name: string imageUrl?: string coverImageUrl?: string + iconImageUrl?: string about?: string websiteUrl?: string companyName?: string