File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,10 @@ func CreateSharedDrive(c echo.Context) error {
7474 }
7575
7676 if attrs .FolderID == "" && attrs .Name == "" {
77- return jsonapi .InvalidParameter ( "folder_id" , errors .New ("folder_id or name is required" ))
77+ return jsonapi .BadRequest ( errors .New ("folder_id or name is required" ))
7878 }
7979 if attrs .FolderID != "" && attrs .Name != "" {
80- return jsonapi .InvalidParameter ( "folder_id" , errors .New ("folder_id and name are mutually exclusive" ))
80+ return jsonapi .BadRequest ( errors .New ("folder_id and name are mutually exclusive" ))
8181 }
8282
8383 if attrs .Name != "" {
Original file line number Diff line number Diff line change @@ -866,7 +866,7 @@ func TestCreateDriveFromFolder(t *testing.T) {
866866 }
867867 }
868868 }` , consts .Sharings ))).
869- Expect ().Status (422 )
869+ Expect ().Status (400 )
870870
871871 resp .JSON (httpexpect.ContentOpts {MediaType : "application/vnd.api+json" }).
872872 Object ().Path ("$.errors[0].detail" ).String ().
@@ -888,7 +888,7 @@ func TestCreateDriveFromFolder(t *testing.T) {
888888 }
889889 }
890890 }` , consts .Sharings , dirID ))).
891- Expect ().Status (422 )
891+ Expect ().Status (400 )
892892
893893 resp .JSON (httpexpect.ContentOpts {MediaType : "application/vnd.api+json" }).
894894 Object ().Path ("$.errors[0].detail" ).String ().
You can’t perform that action at this time.
0 commit comments