Implemented first pass of character and inventory services
This commit is contained in:
@ -100,7 +100,6 @@ var _ = Service("front", func() {
|
||||
|
||||
HTTP(func() {
|
||||
POST("/character")
|
||||
Body(Character)
|
||||
Response(StatusBadRequest)
|
||||
Response(StatusOK)
|
||||
Response(StatusInternalServerError)
|
||||
@ -115,7 +114,6 @@ var _ = Service("front", func() {
|
||||
|
||||
HTTP(func() {
|
||||
PUT("/character/{id}")
|
||||
Body(Character)
|
||||
Response(StatusOK)
|
||||
Response(StatusBadRequest)
|
||||
Response(StatusNotFound)
|
||||
@ -129,7 +127,7 @@ var _ = Service("front", func() {
|
||||
Error("BadRequest")
|
||||
|
||||
HTTP(func() {
|
||||
POST("/character/{id}")
|
||||
DELETE("/character/{id}")
|
||||
Response(StatusOK)
|
||||
Response(StatusBadRequest)
|
||||
Response(StatusNotFound)
|
||||
@ -137,26 +135,26 @@ var _ = Service("front", func() {
|
||||
})
|
||||
|
||||
Method("addItemToInventory", func() {
|
||||
Payload(Int)
|
||||
Payload(InventoryRecord)
|
||||
Result(Empty)
|
||||
Error("NotFound")
|
||||
Error("BadRequest")
|
||||
|
||||
HTTP(func() {
|
||||
POST("/inventory/{CharacterId}")
|
||||
POST("/character/{characterId}/item")
|
||||
Response(StatusOK)
|
||||
Response(StatusBadRequest)
|
||||
})
|
||||
})
|
||||
|
||||
Method("removeItemFromInventory", func() {
|
||||
Payload(Int)
|
||||
Payload(InventoryRecord)
|
||||
Result(Empty)
|
||||
Error("NotFound")
|
||||
Error("BadRequest")
|
||||
|
||||
HTTP(func() {
|
||||
PUT("/inventory/{CharacterId}")
|
||||
DELETE("/character/{characterId}/item/{itemId}")
|
||||
Response(StatusOK)
|
||||
Response(StatusBadRequest)
|
||||
})
|
||||
|
Reference in New Issue
Block a user