mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Auto stash before merge of "dev" and "origin/dev"
This commit is contained in:
parent
4429198397
commit
6ab57a1ace
@ -10,7 +10,7 @@ export interface FilterQueryResult<T> {
|
||||
setParams: Dispatch<SetStateAction<T | SearchFilter>>;
|
||||
}
|
||||
|
||||
export function useFilterQuery<T>({
|
||||
export function useFilterQuery<T = any>({
|
||||
queryKey,
|
||||
queryFn,
|
||||
...options
|
||||
|
@ -37,6 +37,16 @@ export default async (
|
||||
|
||||
const { teamId, userId } = req.query;
|
||||
|
||||
if (req.method === 'GET') {
|
||||
if (!(await canUpdateTeam(req.auth, teamId))) {
|
||||
return unauthorized(res, 'You must be the owner of this team.');
|
||||
}
|
||||
|
||||
const teamUser = await getTeamUser(teamId, userId);
|
||||
|
||||
return ok(res, teamUser);
|
||||
}
|
||||
|
||||
if (req.method === 'POST') {
|
||||
if (!(await canUpdateTeam(req.auth, teamId))) {
|
||||
return unauthorized(res, 'You must be the owner of this team.');
|
||||
|
Loading…
Reference in New Issue
Block a user