Auto stash before merge of "dev" and "origin/dev"

This commit is contained in:
Brian Cao 2024-02-01 12:05:55 -08:00
parent 4429198397
commit 6ab57a1ace
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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.');