mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Refactored queries.
This commit is contained in:
parent
f36a689817
commit
8904b7b4ed
27 changed files with 137 additions and 144 deletions
|
|
@ -2,7 +2,7 @@ import { NextApiRequestQueryBody } from 'lib/types';
|
|||
import { secret } from 'lib/crypto';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { createToken, methodNotAllowed, notFound, ok } from 'next-basics';
|
||||
import { getWebsite } from 'queries';
|
||||
import { getWebsiteByShareId } from 'queries';
|
||||
|
||||
export interface ShareRequestQuery {
|
||||
id: string;
|
||||
|
|
@ -20,7 +20,7 @@ export default async (
|
|||
const { id: shareId } = req.query;
|
||||
|
||||
if (req.method === 'GET') {
|
||||
const website = await getWebsite({ shareId });
|
||||
const website = await getWebsiteByShareId(shareId);
|
||||
|
||||
if (website) {
|
||||
const data = { websiteId: website.id };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue