removed shitty regexp

This commit is contained in:
Yaroslav
2021-04-14 01:02:27 +03:00
parent 44f2eb3ed6
commit 3a97ef8cd0
-4
View File
@@ -143,10 +143,6 @@ func randId() string {
func load(c echo.Context, db *sql.DB) (*Note, int) { func load(c echo.Context, db *sql.DB) (*Note, int) {
q := c.Param("id") q := c.Param("id")
if !rexpNoteID.Match([]byte(q)) {
code := http.StatusNotFound
return nil, code
}
c.Logger().Debugf("loading note %s", q) c.Logger().Debugf("loading note %s", q)
stmt, _ := db.Prepare("select * from notes where id = ?") stmt, _ := db.Prepare("select * from notes where id = ?")
defer stmt.Close() defer stmt.Close()