Server setup in the app

This commit is contained in:
Ian Gulliver
2026-10-18 22:17:54 -07:00
parent 327aab069d
commit 602e6703b4
16 changed files with 825 additions and 269 deletions
+9
View File
@@ -623,6 +623,15 @@ func (s *Server) GetStatus(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, status)
}
func (s *Server) CheckPermissions(w http.ResponseWriter, r *http.Request) {
perms, err := s.agents.CheckPermissions(r.Context())
if err != nil {
writeError(w, http.StatusInternalServerError, err)
return
}
writeJSON(w, http.StatusOK, perms)
}
func (s *Server) status(ctx context.Context) (api.Status, error) {
c, err := s.store.Counts(ctx)
if err != nil {