ready to PR

This commit is contained in:
2024-04-21 18:46:54 +02:00
parent 0d6b4ec57c
commit 172837d6d1
9 changed files with 12 additions and 12 deletions

View File

@ -27,6 +27,7 @@ dependencies {
implementation("com.kohlschutter.junixsocket:junixsocket-core:2.9.0")
// implementation("org.springframework.session:spring-session-jdbc")
developmentOnly("org.springframework.boot:spring-boot-devtools")
developmentOnly("org.springframework.boot:spring-boot-docker-compose")
runtimeOnly("org.postgresql:postgresql")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-testcontainers")

View File

@ -88,7 +88,6 @@ public class CourseController {
{
if (authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin},token))
return new UnauthorizedResponse<>(null);
System.out.println(course.getOwner().getRegNo());
Course createdCourse = courseServ.save(course);
if (createdCourse == null)
return new ResponseEntity<>(null,HttpStatus.BAD_REQUEST);

View File

@ -103,7 +103,7 @@ public class LessonService {
case "lessonType":
target.setLessonType((String) entry.getValue());
break;
case "courseId":
case "courseID":
target.setCourse(courseRepo.findById((int) entry.getValue()));
break;
}

View File

@ -50,7 +50,7 @@ public class ProtectionService {
HashMap<String ,Object> toReturn = new HashMap<>();
toReturn.put("courseID",course.getCourseId());
toReturn.put("courseID",course.getCourseID());
toReturn.put("credits",course.getCredits());
toReturn.put("title", course.getTitle());
toReturn.put("owner", userWithoutPassword(course.getOwner()));

View File

@ -18,7 +18,7 @@ import org.hibernate.annotations.OnDeleteAction;
public class Course {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int courseId;
private int courseID;
private int credits;
private String title;