19 lines
279 B
Go
19 lines
279 B
Go
package handlers
|
|
|
|
import (
|
|
sqlc "nyanimedb/sql"
|
|
"strconv"
|
|
)
|
|
|
|
type Server struct {
|
|
db *sqlc.Queries
|
|
}
|
|
|
|
func NewServer(db *sqlc.Queries) Server {
|
|
return Server{db: db}
|
|
}
|
|
|
|
func parseInt64(s string) (int32, error) {
|
|
i, err := strconv.ParseInt(s, 10, 64)
|
|
return int32(i), err
|
|
}
|