feat(crm): queue contact imports
This commit is contained in:
@@ -932,7 +932,7 @@ func (h *ContactHandler) Import(c *gin.Context) {
|
||||
file, _, fileErr = c.Request.FormFile("file")
|
||||
}
|
||||
if fileErr != nil {
|
||||
c.JSON(http.StatusUnprocessableEntity, gin.H{"error": "failed to import contacts"})
|
||||
c.JSON(http.StatusUnprocessableEntity, gin.H{"error": "File is blank"})
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
@@ -93,7 +93,7 @@ func TestContactImportMissingFile(t *testing.T) {
|
||||
assert.Equal(t, http.StatusUnprocessableEntity, w.Code)
|
||||
var resp map[string]interface{}
|
||||
json.Unmarshal(w.Body.Bytes(), &resp)
|
||||
assert.Contains(t, resp, "error")
|
||||
assert.Equal(t, "File is blank", resp["error"])
|
||||
}
|
||||
|
||||
func TestContactableInboxesBadAccountID(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user