20 lines
434 B
Java
20 lines
434 B
Java
package com.drinkool.services;
|
|
|
|
import com.drinkool.Url;
|
|
import com.drinkool.entities.CustomerEntity;
|
|
import jakarta.transaction.Transactional;
|
|
import jakarta.ws.rs.*;
|
|
import jakarta.ws.rs.core.Response;
|
|
import com.drinkool.Jwt;
|
|
|
|
@Path("")
|
|
public class CustomerService {
|
|
|
|
@POST
|
|
@Path(Url.Me)
|
|
@Transactional
|
|
public Response me(@HeaderParam(Jwt.userId) String id) {
|
|
return Response.ok(CustomerEntity.find("id", id)).build();
|
|
}
|
|
}
|