Fixing bug where items were allowed to be deleted when referenced by a character

This commit is contained in:
watsonb8 committed 2023-08-15 19:22:07 -05:00
1 parent abce265ba5
commit 5b9e100028
4 files changed
+85 -5

No files matched your search

+28
View File
@@ -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)
})
})
})