Link up teams UI.

This commit is contained in:
Brian Cao 2023-03-08 22:48:20 -08:00
parent bb2cd93ad4
commit aa9ad5594c
18 changed files with 504 additions and 114 deletions

View file

@ -6,13 +6,13 @@ import { methodNotAllowed, ok, notFound } from 'next-basics';
import { createTeamUser, getTeam } from 'queries';
import { ROLES } from 'lib/constants';
export interface TeamsRequestBody {
export interface TeamsJoinRequestBody {
accessCode: string;
}
export default async (
req: NextApiRequestQueryBody<any, TeamsRequestBody>,
res: NextApiResponse<Team[] | Team>,
req: NextApiRequestQueryBody<any, TeamsJoinRequestBody>,
res: NextApiResponse<Team>,
) => {
await useAuth(req, res);