KI-AGENT: Matrix-Mandanten-Space provisionieren
This commit is contained in:
@@ -27,4 +27,26 @@ export default async function communicationRoutes(server: FastifyInstance) {
|
||||
.send({ error: err.message || "Matrix provisioning failed" })
|
||||
}
|
||||
})
|
||||
|
||||
server.get("/communication/matrix/tenant-space", async (req, reply) => {
|
||||
try {
|
||||
return await matrix.getTenantSpaceStatus(req.user.tenant_id)
|
||||
} catch (err: any) {
|
||||
req.log.error(err)
|
||||
return reply
|
||||
.code(err.statusCode || 500)
|
||||
.send({ error: err.message || "Matrix tenant space status failed" })
|
||||
}
|
||||
})
|
||||
|
||||
server.post("/communication/matrix/tenant-space/provision", async (req, reply) => {
|
||||
try {
|
||||
return await matrix.provisionCurrentTenantSpace(req.user.user_id, req.user.tenant_id)
|
||||
} catch (err: any) {
|
||||
req.log.error(err)
|
||||
return reply
|
||||
.code(err.statusCode || 500)
|
||||
.send({ error: err.message || "Matrix tenant space provisioning failed" })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user