Skip to content

Commit

Permalink
MessageService getAllMessages method
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsundin committed Jan 30, 2024
1 parent 5acc6e8 commit f980e5e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/Service/MessageService.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import DAO.MessageDAO;
import DAO.AccountDAO;

import java.util.List;

public class MessageService {
MessageDAO messageDAO;
AccountDAO accountDAO;
Expand Down Expand Up @@ -32,5 +34,9 @@ public boolean messageIsValid(int posted_by, String message_text) {
public Message insertMessage(int posted_by, String message_text, long time_posted_epoch) {
return messageDAO.insertMessage(posted_by, message_text, time_posted_epoch);
}

public List<Message> getAllMessages() {
return messageDAO.getAllMessages();
}

}

0 comments on commit f980e5e

Please sign in to comment.