Skip to content

Commit

Permalink
force-update: return package/version location
Browse files Browse the repository at this point in the history
  • Loading branch information
xtuc committed Apr 15, 2022
1 parent cb47cd3 commit 1309ae2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion functions/force-update/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ func Invoke(w http.ResponseWriter, r *http.Request) {
log.Fatalf("could not audit: %s", err)
}

w.WriteHeader(http.StatusOK)
w.Write([]byte(fmt.Sprintf("OK, file: https://storage.googleapis.com/cdnjs-incoming-prod/%s", filename)))
return
}
}

w.Write([]byte("OK"))
http.Error(w, "package or version not found", 404)
}

0 comments on commit 1309ae2

Please sign in to comment.