From 3a97ef8cd0eb669af5b7843975ec8a048517afb8 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Wed, 14 Apr 2021 01:01:57 +0300 Subject: [PATCH] removed shitty regexp --- storage.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/storage.go b/storage.go index 43e6436..029536c 100644 --- a/storage.go +++ b/storage.go @@ -143,10 +143,6 @@ func randId() string { func load(c echo.Context, db *sql.DB) (*Note, int) { q := c.Param("id") - if !rexpNoteID.Match([]byte(q)) { - code := http.StatusNotFound - return nil, code - } c.Logger().Debugf("loading note %s", q) stmt, _ := db.Prepare("select * from notes where id = ?") defer stmt.Close()