removed auth from picture upload

This commit is contained in:
verboomp
2026-02-02 08:13:28 +01:00
parent 94c6becf9f
commit 33ee33d55c
7 changed files with 29 additions and 31 deletions

View File

@@ -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();

View File

@@ -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();
}