Typo: createAt to createdAt

pull/21/head v0.2.4
zijiren233 1 year ago
parent 42711622e6
commit 9b5c3bde37

@ -31,7 +31,7 @@ type movies struct {
type Movie struct {
BaseMovieInfo
PullKey string `json:"pullKey"`
CreatedAt int64 `json:"createAt"`
CreatedAt int64 `json:"createdAt"`
id uint64
channel *rtmps.Channel

@ -33,7 +33,7 @@ type Room struct {
users rwmap.RWMap[string, *User]
rootUser *User
lastActive int64
createAt int64
createdAt int64
mid uint64
hub *hub
*movies
@ -74,7 +74,7 @@ func NewRoom(RoomId string, Password string, rtmps *rtmps.Server, conf ...RoomCo
id: RoomId,
rtmps: rtmps,
lastActive: now,
createAt: now,
createdAt: now,
}
for _, c := range conf {
@ -97,8 +97,8 @@ func (r *Room) Init() {
})
}
func (r *Room) CreateAt() int64 {
return atomic.LoadInt64(&r.createAt)
func (r *Room) CreatedAt() int64 {
return atomic.LoadInt64(&r.createdAt)
}
func (r *Room) RootUser() *User {

@ -114,7 +114,7 @@ func RoomList(ctx *gin.Context) {
PeopleNum: v.ClientNum(),
NeedPassword: v.NeedPassword(),
Creator: v.RootUser().Name(),
CreateAt: v.CreateAt(),
CreatedAt: v.CreatedAt(),
})
}
@ -127,11 +127,11 @@ func RoomList(ctx *gin.Context) {
}, func(t1, t2 *model.RoomListResp) bool {
return t1.Creator == t2.Creator
})
case "createAt":
case "createdAt":
resp.SortStableFunc(func(v1, v2 *model.RoomListResp) bool {
return v1.CreateAt < v2.CreateAt
return v1.CreatedAt < v2.CreatedAt
}, func(t1, t2 *model.RoomListResp) bool {
return t1.CreateAt == t2.CreateAt
return t1.CreatedAt == t2.CreatedAt
})
case "roomId":
resp.SortStableFunc(func(v1, v2 *model.RoomListResp) bool {

@ -73,7 +73,7 @@ type RoomListResp struct {
PeopleNum int64 `json:"peopleNum"`
NeedPassword bool `json:"needPassword"`
Creator string `json:"creator"`
CreateAt int64 `json:"createAt"`
CreatedAt int64 `json:"createdAt"`
}
type LoginRoomReq struct {

Loading…
Cancel
Save