Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e60c0b89b9 | |||
| 08e7242382 |
@@ -1,3 +1,10 @@
|
|||||||
|
## [1.5.14](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.5.13...v1.5.14) (2026-04-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add menu creation and query ([#37](https://git.demonkernel.io.vn/FoodSurf/backend/issues/37)) ([c9d6439](https://git.demonkernel.io.vn/FoodSurf/backend/commit/c9d6439cf8839bd20190d4ae3f410763052781e9))
|
||||||
|
|
||||||
## [1.5.13](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.5.12...v1.5.13) (2026-04-23)
|
## [1.5.13](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.5.12...v1.5.13) (2026-04-23)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.drinkool</groupId>
|
<groupId>com.drinkool</groupId>
|
||||||
<artifactId>drinkool</artifactId>
|
<artifactId>drinkool</artifactId>
|
||||||
<version>1.5.13</version>
|
<version>1.5.14</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.drinkool</groupId>
|
<groupId>com.drinkool</groupId>
|
||||||
<artifactId>drinkool</artifactId>
|
<artifactId>drinkool</artifactId>
|
||||||
<version>1.5.13</version>
|
<version>1.5.14</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,11 @@ public class MenuItemEntity extends BaseEntity {
|
|||||||
* Phương thức tiện ích để tạo nhanh Menu Item từ tên
|
* Phương thức tiện ích để tạo nhanh Menu Item từ tên
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public static MenuItemEntity create(EateryEntity eatery, String name, double price) {
|
public static MenuItemEntity create(
|
||||||
|
EateryEntity eatery,
|
||||||
|
String name,
|
||||||
|
double price
|
||||||
|
) {
|
||||||
MenuItemEntity menuItem = new MenuItemEntity();
|
MenuItemEntity menuItem = new MenuItemEntity();
|
||||||
|
|
||||||
menuItem.name = name;
|
menuItem.name = name;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.drinkool</groupId>
|
<groupId>com.drinkool</groupId>
|
||||||
<artifactId>drinkool</artifactId>
|
<artifactId>drinkool</artifactId>
|
||||||
<version>1.5.13</version>
|
<version>1.5.14</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.util.*;
|
|||||||
import org.eclipse.microprofile.rest.client.inject.RestClient;
|
import org.eclipse.microprofile.rest.client.inject.RestClient;
|
||||||
|
|
||||||
@Path("/api/" + Role.Customer)
|
@Path("/api/" + Role.Customer)
|
||||||
public class CustomerController extends BaseController {
|
public class CustomerController {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@RestClient
|
@RestClient
|
||||||
@@ -23,12 +23,6 @@ public class CustomerController extends BaseController {
|
|||||||
return accountService.signup(input);
|
return accountService.signup(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
|
||||||
@Path(Url.Login)
|
|
||||||
public Uni<Response> proxyLogin(Login input) {
|
|
||||||
return accountService.login(input);
|
|
||||||
}
|
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Path(Url.QuickSignup)
|
@Path(Url.QuickSignup)
|
||||||
public Uni<Response> proxyQuickSignup(QuickSignup input) {
|
public Uni<Response> proxyQuickSignup(QuickSignup input) {
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.drinkool.controller;
|
||||||
|
|
||||||
|
import com.drinkool.Url;
|
||||||
|
import com.drinkool.dtos.Login;
|
||||||
|
import com.drinkool.services.CustomerService;
|
||||||
|
import com.drinkool.services.ManagerService;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
import jakarta.inject.Inject;
|
||||||
|
import jakarta.ws.rs.POST;
|
||||||
|
import jakarta.ws.rs.Path;
|
||||||
|
import jakarta.ws.rs.core.Response;
|
||||||
|
import org.eclipse.microprofile.rest.client.inject.RestClient;
|
||||||
|
|
||||||
|
@Path("/api")
|
||||||
|
public class MainController extends BaseController {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@RestClient
|
||||||
|
ManagerService managerService;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@RestClient
|
||||||
|
CustomerService customerService;
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path(Url.Login)
|
||||||
|
public Uni<Response> proxyLogin(Login input) {
|
||||||
|
return managerService
|
||||||
|
.login(input)
|
||||||
|
.onFailure()
|
||||||
|
.recoverWithUni(() -> {
|
||||||
|
return customerService.login(input);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ import java.util.*;
|
|||||||
import org.eclipse.microprofile.rest.client.inject.RestClient;
|
import org.eclipse.microprofile.rest.client.inject.RestClient;
|
||||||
|
|
||||||
@Path("/api/" + Role.Manager)
|
@Path("/api/" + Role.Manager)
|
||||||
public class ManagerController extends BaseController {
|
public class ManagerController {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@RestClient
|
@RestClient
|
||||||
@@ -23,12 +23,6 @@ public class ManagerController extends BaseController {
|
|||||||
return managerService.signup(input);
|
return managerService.signup(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@POST
|
|
||||||
@Path(Url.Login)
|
|
||||||
public Uni<Response> proxyLogin(Login input) {
|
|
||||||
return managerService.login(input);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
public Uni<Response> me(@HeaderParam(InternalValue.userId) UUID id) {
|
public Uni<Response> me(@HeaderParam(InternalValue.userId) UUID id) {
|
||||||
return managerService.me(id);
|
return managerService.me(id);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class BaseControllerTest {
|
|||||||
public void testLogoutShouldClearCookie() {
|
public void testLogoutShouldClearCookie() {
|
||||||
given()
|
given()
|
||||||
.when()
|
.when()
|
||||||
.post("/api/" + Role.Customer + Url.Logout)
|
.post("/api" + Url.Logout)
|
||||||
.then()
|
.then()
|
||||||
.statusCode(204)
|
.statusCode(204)
|
||||||
.header("Set-Cookie", containsString(InternalValue.cookieName))
|
.header("Set-Cookie", containsString(InternalValue.cookieName))
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: account-pod
|
- name: account-pod
|
||||||
image: git.demonkernel.io.vn/foodsurf/account-service:1.5.13
|
image: git.demonkernel.io.vn/foodsurf/account-service:1.5.14
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: eatery-pod
|
- name: eatery-pod
|
||||||
image: git.demonkernel.io.vn/foodsurf/eatery-service:1.5.13
|
image: git.demonkernel.io.vn/foodsurf/eatery-service:1.5.14
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: gateway-pod
|
- name: gateway-pod
|
||||||
image: git.demonkernel.io.vn/foodsurf/gateway-service:1.5.13
|
image: git.demonkernel.io.vn/foodsurf/gateway-service:1.5.14
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
|
|||||||
+6
-6
@@ -1,15 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<project
|
<project
|
||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||||
>
|
>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.drinkool</groupId>
|
<groupId>com.drinkool</groupId>
|
||||||
<artifactId>drinkool</artifactId>
|
<artifactId>drinkool</artifactId>
|
||||||
<version>1.5.13</version>
|
<version>1.5.14</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -60,4 +60,4 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.drinkool</groupId>
|
<groupId>com.drinkool</groupId>
|
||||||
<artifactId>drinkool</artifactId>
|
<artifactId>drinkool</artifactId>
|
||||||
<version>1.5.13</version>
|
<version>1.5.14</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>25</maven.compiler.source>
|
<maven.compiler.source>25</maven.compiler.source>
|
||||||
|
|||||||
Reference in New Issue
Block a user