Renamed module 'api' to 'client-api'

This commit is contained in:
Andrey Terentev 2024-03-11 20:28:01 +07:00 committed by Andrey Terentev
parent 5e7976ed97
commit 0381fac93c
39 changed files with 6 additions and 5 deletions

View File

@ -10,7 +10,7 @@ configurations {
} }
dependencies { dependencies {
implementation project(":api") implementation project(":client-api")
developmentOnly("org.springframework.boot:spring-boot-devtools") developmentOnly("org.springframework.boot:spring-boot-devtools")
implementation 'org.springframework.boot:spring-boot-starter-aop' implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-security'

View File

@ -5,14 +5,14 @@ public class ValidateIdentifier {
private ValidateIdentifier() {} private ValidateIdentifier() {}
public static boolean forNode(String nodeId) { public static boolean forNode(String nodeId) {
return nodeId.matches("^[a-z\\d-]+$"); return nodeId.matches("^(?!-)[a-z\\d-]{0,31}[a-z\\d](?!-)$");
} }
public static boolean forRoom(String roomId) { public static boolean forRoom(String roomId) {
return roomId.matches("^[a-z\\d-]+$"); return roomId.matches("^(?!-)[a-z\\d-]{0,31}[a-z\\d](?!-)$");
} }
public static boolean forUser(String username) { public static boolean forUser(String username) {
return username.matches("^[aA-zZ\\d-.\\s:@_;]+$"); return username.matches("^[aA-zZ\\d-.\\s:@_;]{1,64}$");
} }
} }

View File

@ -27,7 +27,7 @@ vaadin {
} }
dependencies { dependencies {
implementation project(":api") implementation project(":client-api")
implementation 'com.vaadin:vaadin-spring-boot-starter' implementation 'com.vaadin:vaadin-spring-boot-starter'
compileOnly 'org.projectlombok:lombok' compileOnly 'org.projectlombok:lombok'

View File

@ -3,4 +3,5 @@ rootProject.name = 'RoomPicker'
include 'app' include 'app'
include 'control-panel' include 'control-panel'
include 'api' include 'api'
include 'client-api'