From f6087ca03fc6a9ff3fd3b0677b0453ee0b03a55b Mon Sep 17 00:00:00 2001 From: Mohsen Karimi Date: Sun, 18 Aug 2024 18:22:41 +0200 Subject: [PATCH] refactor: remove leftover parts from the old project --- src/main/java/app/teamwize/api/auth/service/TokenService.java | 2 +- src/main/java/app/teamwize/api/base/config/SwaggerConfig.java | 2 +- ...piModelConverter.java => TeamwizeOpenApiModelConverter.java} | 2 +- src/main/java/app/teamwize/api/base/validator/NotTempEmail.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/main/java/app/teamwize/api/base/openapi/{RoutetitanOpenApiModelConverter.java => TeamwizeOpenApiModelConverter.java} (97%) diff --git a/src/main/java/app/teamwize/api/auth/service/TokenService.java b/src/main/java/app/teamwize/api/auth/service/TokenService.java index 3f8f1d0..763a80b 100644 --- a/src/main/java/app/teamwize/api/auth/service/TokenService.java +++ b/src/main/java/app/teamwize/api/auth/service/TokenService.java @@ -70,7 +70,7 @@ public String generateToken(String subject, Algorithm key, LocalDateTime expires .withPayload(claims) .withSubject(subject) .withIssuedAt(now) - .withIssuer("Routetitan-Auth") + .withIssuer("Teamwize-Auth") .withExpiresAt(expiresAtInstant) .sign(key); } diff --git a/src/main/java/app/teamwize/api/base/config/SwaggerConfig.java b/src/main/java/app/teamwize/api/base/config/SwaggerConfig.java index 65163f5..8df17c1 100644 --- a/src/main/java/app/teamwize/api/base/config/SwaggerConfig.java +++ b/src/main/java/app/teamwize/api/base/config/SwaggerConfig.java @@ -207,7 +207,7 @@ private Components buildComponentsWithAdditionalCustomExceptions() throws ClassN scanner.addIncludeFilter(new AnnotationTypeFilter(ResponseStatus.class)); - for (var bd : scanner.findCandidateComponents("com.routetitan.account.api")) { + for (var bd : scanner.findCandidateComponents("app.teamwize.api")) { var className = Class.forName(bd.getBeanClassName()); var annotation = className.getDeclaredAnnotation(ResponseStatus.class); var errorCode = className.getSimpleName().replaceAll("Exception", "Error"); diff --git a/src/main/java/app/teamwize/api/base/openapi/RoutetitanOpenApiModelConverter.java b/src/main/java/app/teamwize/api/base/openapi/TeamwizeOpenApiModelConverter.java similarity index 97% rename from src/main/java/app/teamwize/api/base/openapi/RoutetitanOpenApiModelConverter.java rename to src/main/java/app/teamwize/api/base/openapi/TeamwizeOpenApiModelConverter.java index d598f0b..40973a3 100644 --- a/src/main/java/app/teamwize/api/base/openapi/RoutetitanOpenApiModelConverter.java +++ b/src/main/java/app/teamwize/api/base/openapi/TeamwizeOpenApiModelConverter.java @@ -20,7 +20,7 @@ @Slf4j @Component -public class RoutetitanOpenApiModelConverter implements ModelConverter { +public class TeamwizeOpenApiModelConverter implements ModelConverter { @Override public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { diff --git a/src/main/java/app/teamwize/api/base/validator/NotTempEmail.java b/src/main/java/app/teamwize/api/base/validator/NotTempEmail.java index c9ee8f8..6933286 100644 --- a/src/main/java/app/teamwize/api/base/validator/NotTempEmail.java +++ b/src/main/java/app/teamwize/api/base/validator/NotTempEmail.java @@ -14,7 +14,7 @@ @Constraint(validatedBy = NotTempEmailValidator.class) public @interface NotTempEmail { - String message() default "com.routetitan.account.nottempmail"; + String message(); Class[] groups() default {};