mirror of
https://github.com/docmost/docmost.git
synced 2025-11-10 09:32:06 +10: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(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
|
||||
.getHttpAdapter()
|
||||
.getInstance()
|
||||
|
||||
Reference in New Issue
Block a user