diff --git a/dev/tool/src/index.ts b/dev/tool/src/index.ts index d3df922fff..2f88e5939b 100644 --- a/dev/tool/src/index.ts +++ b/dev/tool/src/index.ts @@ -1677,7 +1677,7 @@ export function devTool ( name = systemAccountUuid } const wsByUrl = await db.workspace.findOne({ url: workspace }) - const account = await db.socialId.findOne({ key: name }) + const account = await db.socialId.findOne({ value: name }) console.log( generateToken(account?.personUuid ?? (name as AccountUuid), wsByUrl?.uuid ?? (workspace as WorkspaceUuid), { ...(opt.admin ? { admin: 'true' } : {}) diff --git a/pods/server/src/rpc.ts b/pods/server/src/rpc.ts index 9cbfed63db..f6907fd912 100644 --- a/pods/server/src/rpc.ts +++ b/pods/server/src/rpc.ts @@ -80,13 +80,13 @@ async function sendJson ( extraHeaders?: OutgoingHttpHeaders ): Promise { // Calculate ETag - let body: any = JSON.stringify(result, rpcJSONReplacer) + let body: Buffer = Buffer.from(JSON.stringify(result, rpcJSONReplacer), 'utf8') const etag = createHash('sha256').update(body).digest('hex') const headers: OutgoingHttpHeaders = { ...(extraHeaders ?? {}), ...keepAliveOptions, - 'Content-Type': 'application/json', + 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'no-cache', ETag: etag }