fix
This commit is contained in:
parent
321f55c09d
commit
6d4818943a
@ -31,6 +31,7 @@ import de.bstly.board.controller.support.EntityResponseStatusException;
|
||||
import de.bstly.board.controller.support.RequestBodyErrors;
|
||||
import de.bstly.board.controller.validation.CommentValidator;
|
||||
import de.bstly.board.model.Comment;
|
||||
import de.bstly.board.model.FlaggedStatus;
|
||||
import de.bstly.board.model.Types;
|
||||
import de.bstly.board.model.Vote;
|
||||
import de.bstly.board.model.VoteType;
|
||||
@ -183,6 +184,7 @@ public class CommentController extends BaseController {
|
||||
comment.setCreated(Instant.now().plus(getCommentDelay(), ChronoUnit.MINUTES));
|
||||
comment.setAuthor(getCurrentUsername());
|
||||
comment.setText(comment.getText().trim());
|
||||
comment.setFlaggedStatus(FlaggedStatus.NORMAL);
|
||||
comment = commentManager.save(comment);
|
||||
|
||||
Vote vote = new Vote();
|
||||
|
@ -37,6 +37,7 @@ import de.bstly.board.controller.support.RequestBodyErrors;
|
||||
import de.bstly.board.controller.validation.EntryValidator;
|
||||
import de.bstly.board.model.Entry;
|
||||
import de.bstly.board.model.EntryStatus;
|
||||
import de.bstly.board.model.FlaggedStatus;
|
||||
import de.bstly.board.model.RankedEntry;
|
||||
import de.bstly.board.model.Types;
|
||||
import de.bstly.board.model.Vote;
|
||||
@ -296,6 +297,7 @@ public class EntryController extends BaseController {
|
||||
entry.setCreated(Instant.now());
|
||||
entry.setAuthor(getCurrentUsername());
|
||||
entry.setEntryStatus(EntryStatus.NORMAL);
|
||||
entry.setFlaggedStatus(FlaggedStatus.NORMAL);
|
||||
entry.setTitle(entry.getTitle().trim());
|
||||
entry.setText(entry.getText().trim());
|
||||
entry = entryManager.save(entry);
|
||||
|
Loading…
Reference in New Issue
Block a user