Deleting files with UTApi, unauthorized
Hey, I'm trying to delete a recently uploaded file when the form is closed but I'm running into auth errors, please can someone help me to understand what I'm missing with the setup - screenshots attached
onUploadComplete stores the file url in the form (and updates the useState to trigger a refresh)
1st ss: trpc mutation
2nd ss: onClose fn for form close
3rd ss: upload component
4 Replies
looking at the docs, it seems like i shouldn't even need to pass through a secret, the default should do it
This isn't an issue with ut, it's an issue with my auth validation, for some reason it's not able to read the user role
this is the error message being hit