added more functionality
This commit is contained in:
@@ -5,19 +5,12 @@ import (
|
||||
"net/http"
|
||||
|
||||
"acooldomain.co/backend/auth"
|
||||
"acooldomain.co/backend/models"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
MaxOwnedServers int `json:"maxed_owned_servers"`
|
||||
Permissions auth.Permission `json:"permissions"`
|
||||
HashedPass auth.Permission `json:"hashedPass"`
|
||||
}
|
||||
|
||||
type Connection struct {
|
||||
connection *mongo.Client
|
||||
}
|
||||
@@ -27,7 +20,7 @@ func (con Connection) GetUsers(c *gin.Context) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
var response []User
|
||||
var response []models.User
|
||||
|
||||
err = users.All(context.TODO(), &response)
|
||||
|
||||
|
Reference in New Issue
Block a user