Type fixes
parent
faa685adb6
commit
94ecb1908a
|
@ -36,8 +36,7 @@ const patchHandler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||||
const caller = viewerRouter.createCaller(ctx);
|
const caller = viewerRouter.createCaller(ctx);
|
||||||
try {
|
try {
|
||||||
const { teamId } = schemaQueryTeamId.parse(req.query);
|
const { teamId } = schemaQueryTeamId.parse(req.query);
|
||||||
const success_url = req.url?.replace("/publish", "");
|
return await caller.teams.publish({ teamId });
|
||||||
return await caller.teams.publish({ teamId, success_url });
|
|
||||||
} catch (cause) {
|
} catch (cause) {
|
||||||
if (cause instanceof TRPCError) {
|
if (cause instanceof TRPCError) {
|
||||||
const statusCode = getHTTPStatusCodeFromError(cause);
|
const statusCode = getHTTPStatusCodeFromError(cause);
|
||||||
|
|
Loading…
Reference in New Issue