mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-04-20 14:07:44 -05:00
fix(grpc): Mongoose FileCTR.create needs an array when using transactions
This commit is contained in:
parent
a95019778c
commit
b1f648a176
|
|
@ -82,7 +82,7 @@ export async function uploadFileCTR(request: UploadFileCTRRequest, context: Call
|
|||
await file.save({ session });
|
||||
}
|
||||
|
||||
file = await FileCTR.create({
|
||||
[file] = await FileCTR.create([{
|
||||
creator_pid: context.user?.pid,
|
||||
// * hash: String,
|
||||
// * file_key: String,
|
||||
|
|
@ -105,7 +105,7 @@ export async function uploadFileCTR(request: UploadFileCTRRequest, context: Call
|
|||
},
|
||||
created: Date.now(),
|
||||
updated: Date.now()
|
||||
});
|
||||
}], { session });
|
||||
|
||||
const cryptoOptions = payloads.map(payload => ({
|
||||
program_id: payload.titleId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user