added soft deleted
This commit is contained in:
1 parent
d1a6fcaadc
commit
e0d03730de
36 files changed
+327
-217
No files matched your search
@@ -290,8 +290,12 @@ func (h *handler) delete(c *gin.Context) {
|
||||
}
|
||||
|
||||
func isClientError(err error) bool {
|
||||
msg := err.Error()
|
||||
return msg == "province not found" || msg == "unique code already exists"
|
||||
switch err.Error() {
|
||||
case "province not found", "unsupported region", "could not generate a unique branch code, try again":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func parseActiveOnly(c *gin.Context, defaultValue bool) (bool, bool) {
|
||||
|
||||
Reference in new issue
Block a user