The backend for the project formerly known as signet, now known as beignet.
Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- package endpoints
-
- import (
- "encoding/json"
- . "github.com/imosed/signet/data"
- "net/http"
- )
-
- type GetQueuesResponse struct {
- Queues []Queue `json:"queues"`
- }
-
- func GetQueues(w http.ResponseWriter, r *http.Request) {
- var resp GetQueuesResponse
-
- Db.Table("queues").Scan(&resp.Queues)
-
- err := json.NewEncoder(w).Encode(resp)
- if err != nil {
- panic("Could not deliver response")
- }
- }
|