The backend for the project formerly known as signet, now known as beignet.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- package endpoints
-
- import (
- "encoding/json"
- . "github.com/imosed/signet/data"
- "net/http"
- )
-
- func UsersExist(w http.ResponseWriter, r *http.Request) {
- var numUsers int64
- Db.Table("users").Count(&numUsers)
-
- var resp SuccessResponse
- resp.Success = numUsers > 0
-
- err := json.NewEncoder(w).Encode(resp)
- if err != nil {
- panic("Could not deliver response")
- }
- }
|