change owner by id
This commit is contained in:
@@ -23,6 +23,7 @@ export default async (req, res) => {
|
|||||||
if (req.method === 'POST') {
|
if (req.method === 'POST') {
|
||||||
const { name, domain, owner, enableShareUrl, shareId } = req.body;
|
const { name, domain, owner, enableShareUrl, shareId } = req.body;
|
||||||
const { accountUuid } = req.auth;
|
const { accountUuid } = req.auth;
|
||||||
|
|
||||||
let account;
|
let account;
|
||||||
|
|
||||||
if (accountUuid) {
|
if (accountUuid) {
|
||||||
@@ -43,7 +44,7 @@ export default async (req, res) => {
|
|||||||
name,
|
name,
|
||||||
domain,
|
domain,
|
||||||
shareId: shareId ? shareId : newShareId,
|
shareId: shareId ? shareId : newShareId,
|
||||||
userId: account ? account.id : +owner || undefined,
|
userId: +owner,
|
||||||
},
|
},
|
||||||
{ websiteUuid },
|
{ websiteUuid },
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user