Compare commits

...

2 Commits

Author SHA1 Message Date
TakahashiNguyen 5434445a4c fix: better manager response (#39)
Release package / release (push) Successful in 16m46s
Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com>
Reviewed-on: #39
2026-04-28 07:23:30 +00:00
gitea-actions dd2e53e24d chore: release [ci skip] 2026-04-26 16:59:12 +00:00
12 changed files with 24 additions and 11 deletions
+7
View File
@@ -1,3 +1,10 @@
## [1.5.15](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.5.14...v1.5.15) (2026-04-26)
### Bug Fixes
* merge customer and manager login ([#38](https://git.demonkernel.io.vn/FoodSurf/backend/issues/38)) ([e60c0b8](https://git.demonkernel.io.vn/FoodSurf/backend/commit/e60c0b89b924c913d1827ebdcfae536cd9e1cde9))
## [1.5.14](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.5.13...v1.5.14) (2026-04-26)
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.5.14</version>
<version>1.5.15</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -1,7 +1,9 @@
package com.drinkool.services;
import com.drinkool.Role;
import com.drinkool.Url;
import com.drinkool.dtos.SmsOtp;
import com.drinkool.entities.ManagerEntity;
import com.drinkool.models.UserModel;
import jakarta.inject.Inject;
import jakarta.ws.rs.*;
@@ -22,11 +24,14 @@ public class AccountService {
.entity("InvalidPhoneNumber")
.build();
if (
ManagerEntity.find("phone", input.phone).firstResult() != null
) return Response.accepted().entity(Role.Manager).build();
String otp = otpService.generateAndSaveOtp(input.phone);
// Ở đây bạn sẽ gọi Kafka để gửi SMS thực tế
System.out.println("OTP cho " + input.phone + " là: " + otp);
return Response.accepted().build();
return Response.accepted().entity(Role.Customer).build();
}
}
@@ -62,6 +62,7 @@ public class ManagerService extends BaseService<ManagerEntity> {
return Response.accepted()
.header(InternalValue.userId, customer.id.toString())
.header(InternalValue.role, Role.Manager)
.entity(customer)
.build();
}
}
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.5.14</version>
<version>1.5.15</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.5.14</version>
<version>1.5.15</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -11,7 +11,7 @@ import java.util.*;
import org.eclipse.microprofile.rest.client.inject.RestClient;
@Path("/api/" + Role.Manager)
public class ManagerController {
public class ManagerController {
@Inject
@RestClient
+1 -1
View File
@@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: account-pod
image: git.demonkernel.io.vn/foodsurf/account-service:1.5.14
image: git.demonkernel.io.vn/foodsurf/account-service:1.5.15
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
+1 -1
View File
@@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: eatery-pod
image: git.demonkernel.io.vn/foodsurf/eatery-service:1.5.14
image: git.demonkernel.io.vn/foodsurf/eatery-service:1.5.15
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
+1 -1
View File
@@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: gateway-pod
image: git.demonkernel.io.vn/foodsurf/gateway-service:1.5.14
image: git.demonkernel.io.vn/foodsurf/gateway-service:1.5.15
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.5.14</version>
<version>1.5.15</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.drinkool</groupId>
<artifactId>drinkool</artifactId>
<version>1.5.14</version>
<version>1.5.15</version>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>25</maven.compiler.source>