more changes
This commit is contained in:
@@ -7,6 +7,9 @@ import (
|
||||
)
|
||||
|
||||
func RemoveGiftcard(grain *CartGrain, req *messages.RemoveGiftcard) error {
|
||||
if grain.PaymentInProgress > 0 {
|
||||
return ErrPaymentInProgress
|
||||
}
|
||||
for i, item := range grain.Giftcards {
|
||||
if item.Id == req.Id {
|
||||
grain.Giftcards = append(grain.Giftcards[:i], grain.Giftcards[i+1:]...)
|
||||
|
||||
Reference in New Issue
Block a user