mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 14:43:06 +08:00
Content parser support for scim+json
This commit is contained in:
@@ -39,6 +39,22 @@ async function bootstrap() {
|
|||||||
await app.register(fastifyMultipart);
|
await app.register(fastifyMultipart);
|
||||||
await app.register(fastifyCookie);
|
await app.register(fastifyCookie);
|
||||||
|
|
||||||
|
app
|
||||||
|
.getHttpAdapter()
|
||||||
|
.getInstance()
|
||||||
|
.addContentTypeParser(
|
||||||
|
'application/scim+json',
|
||||||
|
{ parseAs: 'string' },
|
||||||
|
(_, body, done) => {
|
||||||
|
try {
|
||||||
|
const json = JSON.parse(body.toString());
|
||||||
|
done(null, json);
|
||||||
|
} catch (err: any) {
|
||||||
|
done(err);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
app
|
app
|
||||||
.getHttpAdapter()
|
.getHttpAdapter()
|
||||||
.getInstance()
|
.getInstance()
|
||||||
|
|||||||
Reference in New Issue
Block a user