mirror of
https://github.com/simon987/ws_bucket.git
synced 2025-04-10 14:06:46 +00:00
Remove dead code
This commit is contained in:
parent
c068352e75
commit
532a7fe726
14
api/api.go
14
api/api.go
@ -24,11 +24,6 @@ var info = Info{
|
||||
Version: "1.0",
|
||||
}
|
||||
|
||||
var motd = WebsocketMotd{
|
||||
Info: info,
|
||||
Motd: "Hello, world",
|
||||
}
|
||||
|
||||
type WebApi struct {
|
||||
server fasthttp.Server
|
||||
db *gorm.DB
|
||||
@ -90,18 +85,9 @@ func New(db *gorm.DB) *WebApi {
|
||||
api.db = db
|
||||
db.AutoMigrate(&UploadSlot{})
|
||||
|
||||
api.setupMotd()
|
||||
|
||||
return api
|
||||
}
|
||||
|
||||
func (api *WebApi) setupMotd() {
|
||||
var data []byte
|
||||
data, _ = json.Marshal(motd)
|
||||
motdMsg, _ := websocket.NewPreparedMessage(websocket.TextMessage, data)
|
||||
api.MotdMessage = motdMsg
|
||||
}
|
||||
|
||||
func (api *WebApi) Run() {
|
||||
address := GetServerAddress()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user