fixed getLanguages method
This commit is contained in:
parent
ff402bdb26
commit
1860f4c7c4
|
|
@ -35,7 +35,7 @@ public class InitCommands
|
|||
}
|
||||
|
||||
@ShellMethod(value = "import Content", key = {"init_languages"})
|
||||
public String initialsLanguages(@ShellOption(defaultValue = ShellOption.NULL) String location) throws FileNotFoundException {
|
||||
public String initialsLanguages(@ShellOption(defaultValue = ShellOption.NULL) String location) {
|
||||
if(this.metaDataStorageService == null){
|
||||
if(location == null)
|
||||
return "LOCATION NEEDED";
|
||||
|
|
@ -46,7 +46,7 @@ public class InitCommands
|
|||
setFolderDir(location);
|
||||
|
||||
|
||||
List<LanguageDto> languages = metaDataStorageService.openLanguages();
|
||||
List<LanguageDto> languages = metaDataStorageService.openLanguagesOrEmpty();
|
||||
|
||||
for (var language:languages
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package eu.csc.ODPAppVehOwnServer.client;
|
||||
|
||||
import eu.csc.ODPAppVehOwnServer.models.APIError;
|
||||
import retrofit2.Response;
|
||||
|
||||
public class ErrorUtils {
|
||||
|
||||
public static APIError parseError(Response<?> response) {
|
||||
|
||||
APIError error = null;
|
||||
|
||||
if(!response.isSuccessful()){
|
||||
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package eu.csc.ODPAppVehOwnServer.models;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ToString
|
||||
public class APIError {
|
||||
private int statusCode;
|
||||
private String message;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue