fix(api-gateway): add meta field to grpc sync calls (#934)

This commit is contained in:
Karol Sójko 2023-11-21 09:21:54 +01:00 committed by GitHub
parent 462ade2145
commit c5c24b3ac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,18 @@ export class GRPCServiceProxy implements ServiceProxyInterface {
if (endpoint === 'items/sync') { if (endpoint === 'items/sync') {
const result = await this.gRPCSyncingServerServiceProxy.sync(request, response, payload) const result = await this.gRPCSyncingServerServiceProxy.sync(request, response, payload)
response.status(result.status).send(result.data) response.status(result.status).send({
meta: {
auth: {
userUuid: response.locals.user?.uuid,
roles: response.locals.roles,
},
server: {
filesServerUrl: this.filesServerUrl,
},
},
data: result.data,
})
return return
} }