mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
Refactored queries.
This commit is contained in:
parent
18e36aa7b3
commit
b16f5cc067
67 changed files with 523 additions and 576 deletions
|
|
@ -3,7 +3,7 @@ import { useValidate } from 'lib/middleware';
|
|||
import { NextApiRequestQueryBody } from 'lib/types';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { createToken, methodNotAllowed, notFound, ok } from 'next-basics';
|
||||
import { getWebsiteByShareId } from 'queries';
|
||||
import { getSharedWebsite } from 'queries';
|
||||
import * as yup from 'yup';
|
||||
|
||||
export interface ShareRequestQuery {
|
||||
|
|
@ -30,7 +30,7 @@ export default async (
|
|||
const { id: shareId } = req.query;
|
||||
|
||||
if (req.method === 'GET') {
|
||||
const website = await getWebsiteByShareId(shareId);
|
||||
const website = await getSharedWebsite(shareId);
|
||||
|
||||
if (website) {
|
||||
const data = { websiteId: website.id };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue