fixed transaction params
gitea/salix/dev Build queued...
Details
gitea/salix/dev Build queued...
Details
This commit is contained in:
parent
8f7b01ca11
commit
1f8f5af301
|
@ -29,8 +29,8 @@ module.exports = Self => {
|
||||||
const accessToken = ctx.options && ctx.options.accessToken || ctx.req && ctx.req.accessToken;
|
const accessToken = ctx.options && ctx.options.accessToken || ctx.req && ctx.req.accessToken;
|
||||||
const userId = accessToken.userId;
|
const userId = accessToken.userId;
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const sender = await models.Account.findById(userId, options);
|
const sender = await models.Account.findById(userId, null, options);
|
||||||
const recipient = await models.Account.findById(data.recipientFk, options);
|
const recipient = await models.Account.findById(data.recipientFk, null, options);
|
||||||
|
|
||||||
await Self.create({
|
await Self.create({
|
||||||
sender: sender.name,
|
sender: sender.name,
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = function(Self) {
|
||||||
|
|
||||||
let address = data.address;
|
let address = data.address;
|
||||||
let newAddress = await Address.create(address, options);
|
let newAddress = await Address.create(address, options);
|
||||||
let client = await Client.findById(address.clientFk, options);
|
let client = await Client.findById(address.clientFk, null, options);
|
||||||
|
|
||||||
if (data.isDefaultAddress) {
|
if (data.isDefaultAddress) {
|
||||||
await client.updateAttributes({
|
await client.updateAttributes({
|
||||||
|
|
Loading…
Reference in New Issue