Fixed Controller Path mistakes
This commit is contained in:
parent
35af40ca0e
commit
18348ac839
@ -11,7 +11,9 @@ import java.util.List;
|
|||||||
public class DozentController {
|
public class DozentController {
|
||||||
|
|
||||||
@GetMapping("/dozent")
|
@GetMapping("/dozent")
|
||||||
public List<Dozent> getDozentList(){
|
public List<Dozent> getDozentList(@RequestParam(name = "searchString", required = false) String searchString){
|
||||||
|
// -> Have to query/intelligently search only when the searchString is present
|
||||||
|
|
||||||
List<Dozent> retList = new ArrayList<>();
|
List<Dozent> retList = new ArrayList<>();
|
||||||
//TODO IMPLEMENT
|
//TODO IMPLEMENT
|
||||||
return retList;
|
return retList;
|
||||||
|
|||||||
@ -8,8 +8,11 @@ import java.util.List;
|
|||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class KlausurController {
|
public class KlausurController {
|
||||||
|
|
||||||
@GetMapping("/klausur")
|
@GetMapping("/klausur")
|
||||||
public List<Klausur> getKlausurList(){
|
public List<Klausur> getKlausurList(@RequestParam(name = "searchString", required = false) String searchString){
|
||||||
|
// -> Have to query/intelligently search only when the searchString is present
|
||||||
|
|
||||||
List<Klausur> retList = new ArrayList<>();
|
List<Klausur> retList = new ArrayList<>();
|
||||||
//TODO IMPLEMENT
|
//TODO IMPLEMENT
|
||||||
return retList;
|
return retList;
|
||||||
@ -22,12 +25,12 @@ public class KlausurController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/klausur")
|
@PostMapping("/klausur")
|
||||||
public Klausur persistDozent(@RequestParam(name = "Klausur") Klausur pKlausur){
|
public Klausur persistKlausur(@RequestParam(name = "Klausur") Klausur pKlausur){
|
||||||
//TODO IMPLEMENT
|
//TODO IMPLEMENT
|
||||||
return new Klausur();
|
return new Klausur();
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/Klausur/{id}")
|
@DeleteMapping("/klausur/{id}")
|
||||||
public void deleteKlausurByID(@PathVariable String id){
|
public void deleteKlausurByID(@PathVariable String id){
|
||||||
//TODO IMPLEMENT - SEARCH; IF EXISTS DELETE
|
//TODO IMPLEMENT - SEARCH; IF EXISTS DELETE
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package de.fswiai.klausurenmodul.controller;
|
package de.fswiai.klausurenmodul.controller;
|
||||||
|
|
||||||
|
import de.fswiai.klausurenmodul.model.Klausur;
|
||||||
import de.fswiai.klausurenmodul.model.Modul;
|
import de.fswiai.klausurenmodul.model.Modul;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -10,7 +11,9 @@ import java.util.List;
|
|||||||
public class ModulController {
|
public class ModulController {
|
||||||
|
|
||||||
@GetMapping("/modul")
|
@GetMapping("/modul")
|
||||||
public List<Modul> getModuleList(){
|
public List<Modul> getModuleList(@RequestParam(name = "searchString", required = false) String searchString){
|
||||||
|
// -> Have to query/intelligently search only when the searchString is present
|
||||||
|
|
||||||
List<Modul> retList = new ArrayList<>();
|
List<Modul> retList = new ArrayList<>();
|
||||||
//TODO IMPLEMENT
|
//TODO IMPLEMENT
|
||||||
return retList;
|
return retList;
|
||||||
@ -22,6 +25,14 @@ public class ModulController {
|
|||||||
return new Modul();
|
return new Modul();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/module/{moduleId}/klausuren")
|
||||||
|
public List<Klausur> getKlausurListForModule(@PathVariable String moduleId){
|
||||||
|
//TODO Search/Filter Query
|
||||||
|
List<Klausur> retList = new ArrayList<>();
|
||||||
|
return retList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/modul")
|
@PostMapping("/modul")
|
||||||
public Modul persistModul(@RequestParam(name = "modul") Modul pModul){
|
public Modul persistModul(@RequestParam(name = "modul") Modul pModul){
|
||||||
//TODO IMPLEMENT
|
//TODO IMPLEMENT
|
||||||
@ -31,5 +42,6 @@ public class ModulController {
|
|||||||
@DeleteMapping("/modul/{id}")
|
@DeleteMapping("/modul/{id}")
|
||||||
public void deleteModuleByID(@PathVariable String id){
|
public void deleteModuleByID(@PathVariable String id){
|
||||||
//TODO IMPLEMENT - SEARCH; IF EXISTS DELETE
|
//TODO IMPLEMENT - SEARCH; IF EXISTS DELETE
|
||||||
|
// Also delete the Klausuren or not? (prob not the files)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ public class Klausur {
|
|||||||
//ID required, ID Format? -> have to check the db
|
//ID required, ID Format? -> have to check the db
|
||||||
private String shortname;
|
private String shortname;
|
||||||
private String longname;
|
private String longname;
|
||||||
|
private Modul modul;
|
||||||
private String filepath; // Should this just be the same as longname?
|
private String filepath; // Should this just be the same as longname?
|
||||||
private String link; // Or should we handle links differently?
|
private String link; // Or should we handle links differently?
|
||||||
//May need a 'semester' field, not sure. Have to check db again.
|
//May need a 'semester' field, not sure. Have to check db again.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user