Fixing bug where items were allowed to be deleted when referenced by a character
This commit is contained in:
@ -21,9 +21,24 @@ var _ = Service("inventory", func() {
|
||||
Field(1, "characterName", String)
|
||||
})
|
||||
Result(ArrayOf(String))
|
||||
Error("NotFound")
|
||||
|
||||
GRPC(func() {
|
||||
Response(CodeOK)
|
||||
Response("NotFound", CodeNotFound)
|
||||
})
|
||||
})
|
||||
|
||||
Method("listCharactersWithItem", func() {
|
||||
Payload(func() {
|
||||
Field(1, "itemName", String)
|
||||
})
|
||||
Result(ArrayOf(String))
|
||||
Error("NotFound")
|
||||
|
||||
GRPC(func() {
|
||||
Response(CodeOK)
|
||||
Response("NotFound", CodeNotFound)
|
||||
})
|
||||
})
|
||||
|
||||
@ -46,4 +61,17 @@ var _ = Service("inventory", func() {
|
||||
Response("NotFound", CodeNotFound)
|
||||
})
|
||||
})
|
||||
|
||||
Method("removeAll", func() {
|
||||
Payload(func() {
|
||||
Field("1", "characterName", String)
|
||||
})
|
||||
Result(Empty)
|
||||
Error("NotFound")
|
||||
|
||||
GRPC(func() {
|
||||
Response(CodeOK)
|
||||
Response("NotFound", CodeNotFound)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user