removed auth from picture upload
This commit is contained in:
@@ -116,7 +116,7 @@ public class CustomerPictureService extends AbstractService {
|
||||
criteriaQuery = criteriaQuery.where(builder.and(predicates.toArray(new Predicate[0])));
|
||||
}
|
||||
|
||||
//criteriaQuery = criteriaQuery.orderBy(builder.asc(builder.lower(customerRoot.get("name")))); FIXME: this causes errors
|
||||
//criteriaQuery = criteriaQuery.orderBy(builder.asc(builder.lower(customerRoot.get("name")))); //FIXME: this causes errors
|
||||
|
||||
TypedQuery<Customer> typedQuery = entityManager.createQuery(criteriaQuery);
|
||||
List<Customer> customers = typedQuery.getResultList();
|
||||
|
||||
@@ -52,12 +52,12 @@ public class CustomerPictureResource {
|
||||
@Operation(summary = "Add Customer Image to database")
|
||||
@ApiResponse(responseCode = "200", description = "Add successfull")
|
||||
public Response doAddCustomerPicture(@Context HttpServletRequest httpServletRequest, @JsonSchemaValidate("schema/customer_picture_add.json") CustomerPictureValue customerPictureValue) {
|
||||
Optional<SecurityIdentity> identity = loginUtils.authenticate(httpServletRequest);
|
||||
/*Optional<SecurityIdentity> identity = loginUtils.authenticate(httpServletRequest);
|
||||
if (identity.isEmpty()) {
|
||||
LOG.debug("identity empty login invalid");
|
||||
return Response.status(Status.UNAUTHORIZED).build();
|
||||
}
|
||||
|
||||
*/
|
||||
boolean success = customerPictureService.addCustomerPicture(customerPictureValue);
|
||||
return success ? Response.ok().build() : Response.status(Status.BAD_REQUEST).build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user