Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/http/routes/tenant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ interface tenantDBInterface {
jwt_secret: string
service_key: string
file_size_limit?: number
feature_image_transformation: boolean
feature_image_transformation?: boolean
}

export default async function routes(fastify: FastifyInstance) {
Expand Down Expand Up @@ -170,13 +170,16 @@ export default async function routes(fastify: FastifyInstance) {
database_url: encrypt(databaseUrl),
jwt_secret: encrypt(jwtSecret),
service_key: encrypt(serviceKey),
feature_image_transformation: features?.imageTransformation?.enabled ?? false,
}

if (fileSizeLimit) {
tenantInfo.file_size_limit = fileSizeLimit
}

if (typeof features?.imageTransformation?.enabled !== 'undefined') {
tenantInfo.feature_image_transformation = features?.imageTransformation?.enabled
}

await knex('tenants').insert(tenantInfo).onConflict('id').merge()
reply.code(204).send()
})
Expand Down