From ca6da03a0bbe3aab0e449d88e236a2af3f7b80bf Mon Sep 17 00:00:00 2001 From: Brian Cao Date: Tue, 17 Oct 2023 21:55:54 -0700 Subject: [PATCH 01/11] Fix query param pass through. --- src/pages/api/users/[id]/websites.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/pages/api/users/[id]/websites.ts b/src/pages/api/users/[id]/websites.ts index ab8fedfb..b5ca5cdb 100644 --- a/src/pages/api/users/[id]/websites.ts +++ b/src/pages/api/users/[id]/websites.ts @@ -30,15 +30,7 @@ export default async ( await useValidate(schema, req, res); const { user } = req.auth; - const { - id: userId, - page = 1, - pageSize, - orderBy, - query = '', - includeTeams, - onlyTeams, - } = req.query; + const { id: userId, page = 1, pageSize, query = '', ...rest } = req.query; if (req.method === 'GET') { if (!user.isAdmin && user.id !== userId) { @@ -49,9 +41,7 @@ export default async ( page, pageSize: +pageSize || undefined, query, - orderBy, - includeTeams, - onlyTeams, + ...rest, }); return ok(res, websites); From b9477db1a2ae4cc3759e1ba264e43d9c21757778 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 19 Oct 2023 16:55:00 -0700 Subject: [PATCH 02/11] Changed Docker URL. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 02a44e1e..32e78e31 100644 --- a/README.md +++ b/README.md @@ -72,13 +72,13 @@ docker compose up -d Alternatively, to pull just the Umami Docker image with PostgreSQL support: ```bash -docker pull docker.umami.dev/umami-software/umami:postgresql-latest +docker pull ghcr.io/umami-software/umami:postgresql-latest ``` Or with MySQL support: ```bash -docker pull docker.umami.dev/umami-software/umami:mysql-latest +docker pull ghcr.io/umami-software/umami:mysql-latest ``` ## Getting updates From 9aa2830d2b9fb3a7321b0614bf52d20bfae1ccb6 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 19 Oct 2023 17:01:21 -0700 Subject: [PATCH 03/11] Fixed test console. --- src/app/(main)/console/TestConsole.js | 15 +++++---------- src/app/(main)/console/[[...id]]/page.tsx | 4 ++-- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/app/(main)/console/TestConsole.js b/src/app/(main)/console/TestConsole.js index 1ae3eaf1..b88bfd77 100644 --- a/src/app/(main)/console/TestConsole.js +++ b/src/app/(main)/console/TestConsole.js @@ -7,19 +7,15 @@ import WebsiteChart from '../../(main)/websites/[id]/WebsiteChart'; import useApi from 'components/hooks/useApi'; import Head from 'next/head'; import Link from 'next/link'; -import { useRouter } from 'next/navigation'; +import useNavigation from 'components/hooks/useNavigation'; import Script from 'next/script'; import { Button } from 'react-basics'; import styles from './TestConsole.module.css'; -export function TestConsole() { +export function TestConsole({ websiteId }) { const { get, useQuery } = useApi(); const { data, isLoading, error } = useQuery(['websites:me'], () => get('/me/websites')); - const router = useRouter(); - const { - basePath, - query: { id }, - } = router; + const { router } = useNavigation(); function handleChange(value) { router.push(`/console/${value}`); @@ -72,7 +68,6 @@ export function TestConsole() { return null; } - const [websiteId] = id || []; const website = data?.data.find(({ id }) => websiteId === id); return ( @@ -87,8 +82,8 @@ export function TestConsole() { <>