Proof of concept (#6)
* Sample template created * added findByName functionality for item * Solve Cors errors and inhibit DefaultExposure * changed project structure * Added frontend * Creation of base template (#1) * changed base path of REST api and updated frontend api quering
This commit is contained in:
14
backend/src/main/whattocook/services/ItemService.java
Normal file
14
backend/src/main/whattocook/services/ItemService.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package whattocook.services;
|
||||
|
||||
import whattocook.models.Item;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface ItemService {
|
||||
Item save(Item item);
|
||||
void deleteById(Long id);
|
||||
Optional<Item> findById(long id);
|
||||
Optional<Item> findByName(String name);
|
||||
List<Item> findAll();
|
||||
}
|
||||
Reference in New Issue
Block a user