fix: return of document after delete
This commit is contained in:
@@ -126,9 +126,9 @@ export const adminRouter = router({
|
|||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
const { id, userId, reason } = input;
|
const { id, userId, reason } = input;
|
||||||
try {
|
try {
|
||||||
await deleteDocument({ id, userId });
|
const document = await deleteDocument({ id, userId });
|
||||||
await sendDeleteEmail({ documentId: id, reason });
|
await sendDeleteEmail({ documentId: id, reason });
|
||||||
return;
|
return document;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
|
|||||||
Reference in New Issue
Block a user