Make username case insensitive on Privacy Grant page

This commit is contained in:
Noah 2022-09-07 21:29:35 -07:00
parent 0c45befac5
commit c2458f14fd

View File

@ -3,6 +3,7 @@ package photo
import ( import (
"fmt" "fmt"
"net/http" "net/http"
"strings"
"code.nonshy.com/nonshy/website/pkg/config" "code.nonshy.com/nonshy/website/pkg/config"
"code.nonshy.com/nonshy/website/pkg/log" "code.nonshy.com/nonshy/website/pkg/log"
@ -61,7 +62,7 @@ func Share() http.HandlerFunc {
// To whom? // To whom?
var ( var (
user *models.User user *models.User
username = r.FormValue("to") username = strings.TrimSpace(strings.ToLower(r.FormValue("to")))
isRevokeAll = r.FormValue("intent") == "revoke-all" isRevokeAll = r.FormValue("intent") == "revoke-all"
) )