mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-01 20:39:44 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
14cd549e1b
@ -1,10 +1,9 @@
|
||||
import classNames from 'classnames';
|
||||
import { useMessages, useNavigation } from 'components/hooks';
|
||||
import { safeDecodeURIComponent } from 'next-basics';
|
||||
import Link from 'next/link';
|
||||
import { ReactNode } from 'react';
|
||||
import { Icon, Icons } from 'react-basics';
|
||||
import classNames from 'classnames';
|
||||
import Link from 'next/link';
|
||||
import { safeDecodeURI } from 'next-basics';
|
||||
import { useNavigation } from 'components/hooks';
|
||||
import { useMessages } from 'components/hooks';
|
||||
import styles from './FilterLink.module.css';
|
||||
|
||||
export interface FilterLinkProps {
|
||||
@ -40,7 +39,7 @@ export function FilterLink({
|
||||
{!value && `(${label || formatMessage(labels.unknown)})`}
|
||||
{value && (
|
||||
<Link href={renderUrl({ [id]: value })} className={styles.label} replace>
|
||||
{safeDecodeURI(label || value)}
|
||||
{safeDecodeURIComponent(label || value)}
|
||||
</Link>
|
||||
)}
|
||||
{externalUrl && (
|
||||
|
@ -11,26 +11,15 @@ export interface TeamWebsiteRequestQuery extends SearchFilter {
|
||||
teamId: string;
|
||||
}
|
||||
|
||||
export interface TeamWebsiteRequestBody {
|
||||
name: string;
|
||||
domain: string;
|
||||
shareId: string;
|
||||
}
|
||||
|
||||
const schema = {
|
||||
GET: yup.object().shape({
|
||||
teamId: yup.string().uuid().required(),
|
||||
...pageInfo,
|
||||
}),
|
||||
POST: yup.object().shape({
|
||||
name: yup.string().max(100).required(),
|
||||
domain: yup.string().max(500).required(),
|
||||
shareId: yup.string().max(50).nullable(),
|
||||
}),
|
||||
};
|
||||
|
||||
export default async (
|
||||
req: NextApiRequestQueryBody<TeamWebsiteRequestQuery, TeamWebsiteRequestBody>,
|
||||
req: NextApiRequestQueryBody<TeamWebsiteRequestQuery, any>,
|
||||
res: NextApiResponse,
|
||||
) => {
|
||||
await useAuth(req, res);
|
||||
|
@ -10,12 +10,6 @@ export interface UserTeamsRequestQuery extends SearchFilter {
|
||||
userId: string;
|
||||
}
|
||||
|
||||
export interface UserTeamsRequestBody {
|
||||
name: string;
|
||||
domain: string;
|
||||
shareId: string;
|
||||
}
|
||||
|
||||
const schema = {
|
||||
GET: yup.object().shape({
|
||||
userId: yup.string().uuid().required(),
|
||||
@ -24,7 +18,7 @@ const schema = {
|
||||
};
|
||||
|
||||
export default async (
|
||||
req: NextApiRequestQueryBody<UserTeamsRequestQuery, UserTeamsRequestBody>,
|
||||
req: NextApiRequestQueryBody<UserTeamsRequestQuery, any>,
|
||||
res: NextApiResponse,
|
||||
) => {
|
||||
await useCors(req, res);
|
||||
|
@ -9,8 +9,7 @@ import * as yup from 'yup';
|
||||
const schema = {
|
||||
GET: yup.object().shape({
|
||||
userId: yup.string().uuid().required(),
|
||||
includeTeams: yup.boolean(),
|
||||
onlyTeams: yup.boolean(),
|
||||
teamId: yup.string().uuid(),
|
||||
...pageInfo,
|
||||
}),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user