Fixed share page issue.

This commit is contained in:
Mike Cao committed 2022-10-24 19:48:10 -07:00
1 parent fc879bbb7d
commit 2290be7ca4
5 files changed
+13 -16

No files matched your search

+4 -3
View File
@@ -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);