forked from Onlineberatung/onlineBeratung-messageService
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: check on writing to a feedback chat if provided group id is valid
- Loading branch information
Showing
15 changed files
with
530 additions
and
289 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,8 @@ | |
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"dependencies": { | ||
"dotenv": "^8.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/de/caritas/cob/messageservice/api/exception/BadRequestException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package de.caritas.cob.messageservice.api.exception; | ||
|
||
import java.util.function.Consumer; | ||
|
||
/** Represents the response status code 400 - Bad Request. */ | ||
public class BadRequestException extends CustomLoggableResponseException { | ||
|
||
/** | ||
* Creates a Bad Request with a custom message to be logged. | ||
* | ||
* @param message the message | ||
* @param loggingMethod the method to log that exception | ||
*/ | ||
public BadRequestException(String message, Consumer<String> loggingMethod) { | ||
super(message, loggingMethod); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/de/caritas/cob/messageservice/api/model/rocket/chat/group/GetGroupInfoDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package de.caritas.cob.messageservice.api.model.rocket.chat.group; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
/** | ||
* GetGroupInfoResponseDto: Rocket.Chat API response object for group infos. | ||
* | ||
* <p>https://docs.rocket.chat/api/rest-api/methods/groups/info | ||
*/ | ||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class GetGroupInfoDto { | ||
|
||
private GroupDto group; | ||
private boolean success; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/de/caritas/cob/messageservice/api/model/rocket/chat/group/GroupDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package de.caritas.cob.messageservice.api.model.rocket.chat.group; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
/** | ||
* GroupDto for {@link GetGroupInfoDto} | ||
* | ||
*/ | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class GroupDto { | ||
|
||
@JsonProperty("_id") | ||
private String roomId; | ||
private String name; | ||
} |
Oops, something went wrong.