Added endpoints

This commit is contained in:
Filip Izydorczyk
2020-08-08 14:14:42 +02:00
parent ac0851ae29
commit 2e40e33545
7 changed files with 77 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package com.plannaplan.services;
import java.util.List;
import com.plannaplan.entities.Course;
import com.plannaplan.repositories.CourseRepository;
@ -15,6 +17,10 @@ public class CourseService {
return this.repo.findByName(name);
}
public List<Course> getAllCourses() {
return this.repo.findAll();
}
public void save(Course course) {
this.repo.save(course);
}