初始化项目文件
This commit is contained in:
19
api_iris/service/api/chessExport.go
Normal file
19
api_iris/service/api/chessExport.go
Normal file
@ -0,0 +1,19 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/v12"
|
||||
"main/jwtSet"
|
||||
)
|
||||
|
||||
func Chess(party iris.Party) {
|
||||
party.Post("/", jwtSet.Jwt.Serve, newChessRoom)
|
||||
party.Get("/", getChessRooms)
|
||||
party.Get("/{id:int}", getChessRoom)
|
||||
party.Post("/{id:int}", jwtSet.Jwt.Serve, joinChessRoom)
|
||||
party.Delete("/{id:int}", jwtSet.Jwt.Serve, leaveChessRoom)
|
||||
party.Put("/{id:int}", jwtSet.Jwt.Serve, updateChessStatus)
|
||||
party.Get("/{id:int}/reset", jwtSet.Jwt.Serve, resetRoom)
|
||||
party.Post("/{id:int}/ai", jwtSet.Jwt.Serve, addAiChessPlayer)
|
||||
party.Put("/{id:int}/ai", jwtSet.Jwt.Serve, updateChessAiStep)
|
||||
party.Get("/test", testChess)
|
||||
}
|
Reference in New Issue
Block a user