API: Prevent setEnabled when domain is not owned

This commit is contained in:
Melon 2025-01-08 00:32:31 +00:00
parent 303e789d82
commit 6f285c8208
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -34,6 +34,7 @@ func setEnabled(rw http.ResponseWriter, req *http.Request, params httprouter.Par
if !validateDomainOwnershipClaims(host, b.Claims.Perms) {
http.Error(rw, "Forbidden", http.StatusForbidden)
return
}
err := db.SetDomainBranchEnabled(req.Context(), database.SetDomainBranchEnabledParams{