Fixed share page issue.
This commit is contained in:
1 parent
fc879bbb7d
commit
2290be7ca4
5 files changed
+13
-16
No files matched your search
@@ -9,10 +9,11 @@ export default async (req, res) => {
|
||||
const website = await getWebsiteByShareId(id);
|
||||
|
||||
if (website) {
|
||||
const { websiteId, websiteUuid } = website;
|
||||
const token = createToken({ websiteId, websiteUuid }, secret());
|
||||
const { websiteUuid } = website;
|
||||
const data = { id: websiteUuid };
|
||||
const token = createToken(data, secret());
|
||||
|
||||
return ok(res, { websiteId, websiteUuid, token });
|
||||
return ok(res, { ...data, token });
|
||||
}
|
||||
|
||||
return notFound(res);
|
||||
|
||||
Reference in new issue
Block a user