add public create end point

This commit is contained in:
Eoin McAfee 2021-09-29 16:22:04 +01:00
parent 0e0a49f16e
commit 30a2c9a137

View file

@ -294,6 +294,9 @@ func (s Server) Handler() http.Handler {
r.Get("/{build}", card.HandleFindAll(s.Builds, s.Card, s.Repos))
r.Get("/{build}/{stage}/{step}", card.HandleFind(s.Builds, s.Card, s.Stages, s.Steps, s.Repos))
r.Get("/{build}/{stage}/{step}/json", card.HandleFindData(s.Builds, s.Card, s.Stages, s.Steps, s.Repos))
r.With(
acl.CheckAdminAccess(),
).Post("/{build}/{stage}/{step}", card.HandleCreate(s.Builds, s.Card, s.Stages, s.Steps, s.Repos))
r.With(
acl.CheckAdminAccess(),
).Delete("/{build}/{stage}/{step}", card.HandleDelete(s.Builds, s.Card, s.Stages, s.Steps, s.Repos))