Skip to content

Commit

Permalink
unstable: handlers: gallery: list all galeries
Browse files Browse the repository at this point in the history
  • Loading branch information
pandadiestro committed Nov 28, 2024
1 parent 93483af commit 8b5c81c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions stiller-backend/internal/handlers/get_gallery.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ func GetGallery(w http.ResponseWriter, r *http.Request, params httprouter.Params

get_galleries := sqlf.
Select("*").
From("gallery").
Where("owner = ?", user_id)
From("gallery")

galleries := make([]dbutils.StillerGallery, 0, 2)
exec_err := sqlitex.ExecuteTransient(new_dbconn, get_galleries.String(), &sqlitex.ExecOptions{
Expand Down
5 changes: 5 additions & 0 deletions stiller-backend/internal/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ var routes = [...]individualHandler{
method: http.MethodGet,
handlefunc: handlers.GetGallery,
},
{
path: "/galleryall",
method: http.MethodGet,
handlefunc: handlers.GetGallery,
},
{
path: "/gallery/new",
method: http.MethodPost,
Expand Down

0 comments on commit 8b5c81c

Please sign in to comment.