KI-AGENT: Matrix-Mandanten-Space provisionieren

This commit is contained in:
2026-05-18 17:11:52 +02:00
parent c893574cb1
commit d0de3cb92e
5 changed files with 418 additions and 87 deletions

View File

@@ -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" })
}
})
}