Create API for discarding file uploads

This commit is contained in:
Eli Ribble 2026-02-24 17:36:59 +00:00
parent c4e5369796
commit a776c83557
No known key found for this signature in database
3 changed files with 32 additions and 11 deletions

View file

@ -42,7 +42,7 @@ type FormEmail struct {
To string `schema:"emailTo"`
}
func postSudoEmail(ctx context.Context, r *http.Request, u *models.User, e FormEmail) (string, *errorWithStatus) {
func postSudoEmail(ctx context.Context, r *http.Request, org *models.Organization, u *models.User, e FormEmail) (string, *errorWithStatus) {
if u.Role != enums.UserroleRoot {
return "", &errorWithStatus{
Message: "You must have sudo powers to do this",
@ -71,7 +71,7 @@ type FormSMS struct {
Phone string `schema:"smsPhone"`
}
func postSudoSMS(ctx context.Context, r *http.Request, u *models.User, sms FormSMS) (string, *errorWithStatus) {
func postSudoSMS(ctx context.Context, r *http.Request, org *models.Organization, u *models.User, sms FormSMS) (string, *errorWithStatus) {
if u.Role != enums.UserroleRoot {
return "", &errorWithStatus{
Message: "You must have sudo powers to do this",