去掉了verify
This commit is contained in:
parent
f6d5112ad5
commit
780e4793de
@ -20,7 +20,7 @@ public class CourseController {
|
|||||||
private CourseService courseService;
|
private CourseService courseService;
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@JwtVerify
|
// @JwtVerify
|
||||||
public ResponseEntity<GetCourseListResponse> getCoursesByRange(@RequestParam Integer start, @RequestParam Integer end, @RequestParam String token) {
|
public ResponseEntity<GetCourseListResponse> getCoursesByRange(@RequestParam Integer start, @RequestParam Integer end, @RequestParam String token) {
|
||||||
if (start >= end) {
|
if (start >= end) {
|
||||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||||
@ -30,7 +30,7 @@ public class CourseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
@JwtVerify
|
// @JwtVerify
|
||||||
public ResponseEntity<Course> getCoursePage(@PathVariable Long id, @RequestParam String token) {
|
public ResponseEntity<Course> getCoursePage(@PathVariable Long id, @RequestParam String token) {
|
||||||
try {
|
try {
|
||||||
return new ResponseEntity<>(courseService.getCourseById(id), HttpStatus.OK);
|
return new ResponseEntity<>(courseService.getCourseById(id), HttpStatus.OK);
|
||||||
@ -40,7 +40,7 @@ public class CourseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@JwtVerify
|
// @JwtVerify
|
||||||
public ResponseEntity<MessageResponse> createCourse(@RequestBody CourseRequest request) {
|
public ResponseEntity<MessageResponse> createCourse(@RequestBody CourseRequest request) {
|
||||||
try {
|
try {
|
||||||
courseService.createCourse(request);
|
courseService.createCourse(request);
|
||||||
@ -53,7 +53,7 @@ public class CourseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/{id}")
|
@PutMapping("/{id}")
|
||||||
@JwtVerify
|
// @JwtVerify
|
||||||
public ResponseEntity<MessageResponse> updateCourse(@PathVariable Long id, @RequestBody CourseRequest request) {
|
public ResponseEntity<MessageResponse> updateCourse(@PathVariable Long id, @RequestBody CourseRequest request) {
|
||||||
try {
|
try {
|
||||||
courseService.updateCourse(id, request);
|
courseService.updateCourse(id, request);
|
||||||
@ -66,7 +66,7 @@ public class CourseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
@JwtVerify
|
// @JwtVerify
|
||||||
public ResponseEntity<MessageResponse> deleteCourse(@PathVariable Long id, @RequestParam String token) {
|
public ResponseEntity<MessageResponse> deleteCourse(@PathVariable Long id, @RequestParam String token) {
|
||||||
try {
|
try {
|
||||||
courseService.deleteCourse(id);
|
courseService.deleteCourse(id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user