File tree Expand file tree Collapse file tree
src/main/java/edu/harvard/iq/dataverse/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1957,17 +1957,17 @@ public Response getLicenseByName(@PathParam("name") String name) {
19571957 @ Path ("/licenses" )
19581958 public Response addLicense (JsonObject jsonObject ) {
19591959 try {
1960- License license = new License ();
1961- license .setName (jsonObject .getString ("name" ));
1960+ License license = new License ();
1961+ license .setName (jsonObject .getString ("name" ));
19621962 license .setShortDescription (jsonObject .getString ("shortDescription" ));
19631963 license .setUri (new URI (jsonObject .getString ("uri" )));
19641964 license .setIconUrl (new URI (jsonObject .getString ("iconUrl" )));
19651965 license .setActive (jsonObject .getBoolean ("active" ));
19661966 licenseService .save (license );
19671967 return created ("/api/admin/licenses" , Json .createObjectBuilder ().add ("message" , "License created" ));
19681968 } catch (RequestBodyException e ) {
1969- return error (Response .Status .BAD_REQUEST , e .getMessage ());
1970- } catch (Exception e ) {
1969+ return error (Response .Status .BAD_REQUEST , e .getMessage ());
1970+ } catch (Exception e ) {
19711971 return error (Response .Status .BAD_REQUEST , "Something went wrong." );
19721972 }
19731973 }
You can’t perform that action at this time.
0 commit comments