Add missing parameter in checkAuthForCertificate

This commit is contained in:
Melon 2023-07-10 18:50:00 +01:00
parent 2f5e74d3f4
commit 04551ec3bb
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -55,7 +55,7 @@ func checkAuthWithPerm(verify mjwt.Verifier, perm string, cb AuthCallback) httpr
func checkAuthForCertificate(verify mjwt.Verifier, perm string, db *sql.DB, cb CertAuthCallback) httprouter.Handle { func checkAuthForCertificate(verify mjwt.Verifier, perm string, db *sql.DB, cb CertAuthCallback) httprouter.Handle {
return checkAuthWithPerm(verify, perm, func(rw http.ResponseWriter, req *http.Request, params httprouter.Params, b AuthClaims) { return checkAuthWithPerm(verify, perm, func(rw http.ResponseWriter, req *http.Request, params httprouter.Params, b AuthClaims) {
// lookup certificate owner // lookup certificate owner
id, err := checkCertOwner(db, "", b) id, err := checkCertOwner(db, params.ByName("id"), b)
if err != nil { if err != nil {
apiError(rw, http.StatusInsufficientStorage, "Database error") apiError(rw, http.StatusInsufficientStorage, "Database error")
return return