Compare commits

...

2 Commits

Author SHA1 Message Date
TakahashiNg df716e60e4 feat: add existed phone number check when signup
Release package / release (push) Successful in 2m48s
2026-03-23 01:02:25 +00:00
gitea-actions 4d3563a5f0 chore: release [ci skip] 2026-03-23 00:55:08 +00:00
6 changed files with 36 additions and 64 deletions
+2 -1
View File
@@ -14,7 +14,8 @@
"redhat.vscode-quarkus", "redhat.vscode-quarkus",
"vscjava.vscode-java-pack", "vscjava.vscode-java-pack",
"redhat.vscode-xml", "redhat.vscode-xml",
"esbenp.prettier-vscode" "esbenp.prettier-vscode",
"PeterSchmalfeldt.explorer-exclude"
] ]
} }
}, },
+19 -17
View File
@@ -1,19 +1,21 @@
{ {
"branches": ["main", { "name": "dev-*", "prerelease": "dev" }], "branches": ["main", { "name": "dev-*", "prerelease": "dev" }],
"plugins": [ "plugins": [
"@semantic-release/commit-analyzer", "@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator", "@semantic-release/release-notes-generator",
"@semantic-release/changelog", "@semantic-release/changelog",
[ [
"@semantic-release/exec", "@semantic-release/exec",
{ {
"prepareCmd": "./mvnw versions:set -DnewVersion=${nextRelease.version}", "prepareCmd": "./mvnw versions:set -DnewVersion=${nextRelease.version}",
"publishCmd": "./mvnw package -Dquarkus.container-image.tag=${nextRelease.version} -DskipTests" "publishCmd": "./mvnw package -Dquarkus.container-image.tag=${nextRelease.version} -DskipTests"
} }
], ],
["@saithodev/semantic-release-gitea", { [
"giteaUrl": "https://git.demonkernel.io.vn/" "@saithodev/semantic-release-gitea",
{
}] "giteaUrl": "https://git.demonkernel.io.vn/"
] }
]
]
} }
+7
View File
@@ -1,3 +1,10 @@
# [1.0.0-dev.17](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.0.0-dev.16...v1.0.0-dev.17) (2026-03-23)
### Bug Fixes
* better build configuration ([d49482b](https://git.demonkernel.io.vn/FoodSurf/backend/commit/d49482b4bac51d4ebb305bed8cfde670fa70d9ec))
# [1.0.0-dev.16](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.0.0-dev.15...v1.0.0-dev.16) (2026-03-23) # [1.0.0-dev.16](https://git.demonkernel.io.vn/FoodSurf/backend/compare/v1.0.0-dev.15...v1.0.0-dev.16) (2026-03-23)
-45
View File
@@ -1,45 +0,0 @@
#Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties
.flattened-pom.xml
# Eclipse
.project
.classpath
.settings/
bin/
# IntelliJ
.idea
*.ipr
*.iml
*.iws
# NetBeans
nb-configuration.xml
# Visual Studio Code
.vscode
.factorypath
# OSX
.DS_Store
# Vim
*.swp
*.swo
# patch
*.orig
*.rej
# Local environment
.env
# Plugin directory
/.quarkus/cli/plugins/
# TLS Certificates
.certs/
@@ -33,6 +33,12 @@ public abstract class User extends PanacheEntity {
@Transactional @Transactional
public void signup(String name, String phone, String rawPassword) { public void signup(String name, String phone, String rawPassword) {
// Check existed user
Customer existedUser = User.find("phone", phone).firstResult();
if (existedUser != null) throw new BadRequestException("ExistedUser");
// Set user
this.name = name; this.name = name;
if (!PhoneValidator.isValidInternationalPhone(phone)) { if (!PhoneValidator.isValidInternationalPhone(phone)) {
@@ -43,6 +49,7 @@ public abstract class User extends PanacheEntity {
this.hashedPassword = Password.hash(rawPassword).withArgon2().getResult(); this.hashedPassword = Password.hash(rawPassword).withArgon2().getResult();
// Save user
this.persist(); this.persist();
} }
+1 -1
View File
@@ -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.0.0-dev.16</version> <version>1.0.0-dev.17</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<properties> <properties>
<maven.compiler.source>17</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>