The backend for the project formerly known as signet, now known as beignet.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

24 行
389 B

  1. package endpoints
  2. import (
  3. "encoding/json"
  4. "net/http"
  5. . "github.com/imosed/signet/data"
  6. )
  7. type GetQueuesResponse struct {
  8. Queues []Queue `json:"queues"`
  9. }
  10. func GetQueues(w http.ResponseWriter, _ *http.Request) {
  11. var resp GetQueuesResponse
  12. Db.Table("queues").Scan(&resp.Queues)
  13. err := json.NewEncoder(w).Encode(resp)
  14. if err != nil {
  15. panic("Could not deliver response")
  16. }
  17. }