mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
move queries
This commit is contained in:
parent
910f165103
commit
8aec6d7406
53 changed files with 920 additions and 485 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { getActiveVisitors } from 'lib/queries';
|
||||
import { methodNotAllowed, ok, unauthorized } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
import { useCors } from 'lib/middleware';
|
||||
import { getActiveVisitors } from 'queries';
|
||||
|
||||
export default async (req, res) => {
|
||||
if (req.method === 'GET') {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import moment from 'moment-timezone';
|
||||
import { getEventMetrics } from 'lib/queries';
|
||||
import { getEventMetrics } from 'queries/analytics';
|
||||
import { ok, badRequest, methodNotAllowed, unauthorized } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
import { useCors } from 'lib/middleware';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { deleteWebsite, getWebsiteById } from 'lib/queries';
|
||||
import { deleteWebsite, getWebsiteById } from 'queries';
|
||||
import { methodNotAllowed, ok, unauthorized } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
import { useCors } from 'lib/middleware';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getPageviewMetrics, getSessionMetrics, getWebsiteById } from 'lib/queries';
|
||||
import { getPageviewMetrics, getSessionMetrics, getWebsiteById } from 'queries';
|
||||
import { ok, methodNotAllowed, unauthorized, badRequest } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
import { useCors } from 'lib/middleware';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import moment from 'moment-timezone';
|
||||
import { getPageviewStats } from 'lib/queries';
|
||||
import { getPageviewStats } from 'queries';
|
||||
import { ok, badRequest, methodNotAllowed, unauthorized } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
import { useCors } from 'lib/middleware';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { resetWebsite } from 'lib/queries';
|
||||
import { resetWebsite } from 'queries';
|
||||
import { methodNotAllowed, ok, unauthorized } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getWebsiteStats } from 'lib/queries';
|
||||
import { getWebsiteStats } from 'queries';
|
||||
import { methodNotAllowed, ok, unauthorized } from 'lib/response';
|
||||
import { allowQuery } from 'lib/auth';
|
||||
import { useCors } from 'lib/middleware';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { updateWebsite, createWebsite, getWebsiteById } from 'lib/queries';
|
||||
import { updateWebsite, createWebsite, getWebsiteById } from 'queries';
|
||||
import { useAuth } from 'lib/middleware';
|
||||
import { uuid, getRandomChars } from 'lib/crypto';
|
||||
import { ok, unauthorized, methodNotAllowed } from 'lib/response';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue