scores 主键改用 UUID v7
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -32,12 +32,7 @@ func (d *Deps) ListScores(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (d *Deps) GetScore(w http.ResponseWriter, r *http.Request) {
|
||||
idStr := chi.URLParam(r, "id")
|
||||
id, err := strconv.ParseInt(idStr, 10, 64)
|
||||
if err != nil {
|
||||
writeErr(w, http.StatusBadRequest, "invalid id")
|
||||
return
|
||||
}
|
||||
id := chi.URLParam(r, "id")
|
||||
row, err := d.Futures.GetScore(id)
|
||||
if err != nil {
|
||||
writeErr(w, http.StatusNotFound, err.Error())
|
||||
|
||||
Reference in New Issue
Block a user