The backend for the project formerly known as signet, now known as beignet.
25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- package endpoints
-
- import (
- "encoding/json"
- "net/http"
-
- . "github.com/imosed/signet/data"
- "github.com/rs/zerolog/log"
- )
-
- type GetQueuesResponse struct {
- Queues []Queue `json:"queues"`
- }
-
- func GetQueues(w http.ResponseWriter, _ *http.Request) {
- var resp GetQueuesResponse
-
- Db.Table("queues").Scan(&resp.Queues)
-
- err := json.NewEncoder(w).Encode(resp)
- if err != nil {
- log.Error().Err(err).Msg("Could not deliver response in GetQueues call")
- }
- }
|