add currency codes endpoint

This commit is contained in:
Asim Aslam
2021-06-16 18:10:52 +01:00
parent 8a8a72a1d1
commit f8db6eb1a9
4 changed files with 84 additions and 54 deletions

View File

@@ -56,8 +56,8 @@ func (c *Currency) Codes(ctx context.Context, req *pb.CodesRequest, rsp *pb.Code
for _, code := range codes {
c := code.([]interface{})
rsp.Codes = append(rsp.Codes, &pb.Code{
Symbol: c[0].(string),
Name: c[1].(string),
Name: c[0].(string),
Currency: c[1].(string),
})
}