Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
|
3379eac5e7 |
|
@ -14,8 +14,6 @@ const (
|
|||
lenUserId = "36" // Same value as the one above
|
||||
LenXAuthorizationHeader = 36 // used for api calls
|
||||
lenSessionEncryptionKey = "32"
|
||||
LenRoomId = 36
|
||||
lenRoomId = "36" // Same value as the one above
|
||||
|
||||
minUsername = "2"
|
||||
maxUsername = "24"
|
||||
|
@ -34,7 +32,6 @@ const (
|
|||
maxAccountStatus = "4" // Indicates the maximum compatible account status. Look for reference in the API
|
||||
maxDescription = "128"
|
||||
maxRoomState = "2" // Look for reference in the API
|
||||
maxRoomUserRole = "2" // Look for reference in the API
|
||||
|
||||
accountNameRegex = "^[a-zA-Z0-9_.]+$"
|
||||
)
|
||||
|
@ -51,8 +48,6 @@ var (
|
|||
"AccountStatus": "number,max=" + maxAccountStatus,
|
||||
"Description": "max=" + maxDescription,
|
||||
"RoomState": "number,max=" + maxRoomState,
|
||||
"Role": "number,max=" + maxRoomUserRole,
|
||||
"RoomId": "required,len=" + lenRoomId,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"errors"
|
||||
"strings"
|
||||
|
||||
gocnjhelper "git.clickandjoin.umbach.dev/ClickandJoin/go-cnj-helper"
|
||||
gocnjhelper "git.ex.umbach.dev/ClickandJoin/go-cnj-helper"
|
||||
"github.com/go-playground/validator/v10"
|
||||
"github.com/gocql/gocql"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
|
11
dbmodels.go
11
dbmodels.go
|
@ -213,19 +213,8 @@ var (
|
|||
DbMRoomUsers = table.New(table.Metadata{
|
||||
Name: "room_users",
|
||||
Columns: []string{
|
||||
"user_id",
|
||||
"room_id",
|
||||
"role",
|
||||
"joined_at",
|
||||
},
|
||||
PartKey: []string{"user_id", "room_id"},
|
||||
})
|
||||
|
||||
DbMRoomUsersHelperPKRoomId = table.New(table.Metadata{
|
||||
Name: "room_users",
|
||||
Columns: []string{
|
||||
"user_id",
|
||||
"room_id",
|
||||
"role",
|
||||
"joined_at",
|
||||
},
|
||||
|
|
|
@ -76,8 +76,8 @@ type Room struct {
|
|||
|
||||
// TABLE room_users
|
||||
type RoomUsers struct {
|
||||
UserId string
|
||||
RoomId string
|
||||
UserId string
|
||||
Role uint8
|
||||
JoinedAt int64
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue