- Timestamp:
- 02/03/24 18:08:44 (9 months ago)
- Branches:
- master
- Children:
- cab1b7d
- Parents:
- aea04dd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/cookbook/service/impl/KomentariServiceImpl.java
raea04dd rd4d8fb9 8 8 9 9 import java.sql.SQLException; 10 import java.time.LocalDateTime; 10 11 import java.util.List; 11 12 … … 23 24 return komentariRepository.findAllByRecId(recId); 24 25 } 26 27 @Override 28 public void add(String telefon, Long id, Integer ocena, String komentar) throws SQLException { 29 if (telefon.isBlank() || ocena == null){ 30 throw new IllegalArgumentException(); 31 } 32 komentariRepository.save(new Komentar(LocalDateTime.now(), telefon, id, ocena, komentar)); 33 } 25 34 }
Note:
See TracChangeset
for help on using the changeset viewer.