66import koreatech .in .annotation .Auth ;
77import koreatech .in .annotation .AuthExcept ;
88import koreatech .in .domain .TimeTable .Lecture ;
9+ import koreatech .in .domain .TimeTable .Semester ;
910import koreatech .in .service .TimeTableService ;
1011import org .springframework .http .HttpStatus ;
1112import org .springframework .http .ResponseEntity ;
1213import org .springframework .stereotype .Controller ;
1314import org .springframework .web .bind .annotation .*;
1415
1516import javax .inject .Inject ;
17+ import java .security .MessageDigest ;
1618import java .util .ArrayList ;
1719import java .util .Map ;
1820
@@ -30,6 +32,13 @@ ResponseEntity getLectureList(@ApiParam(value = "학기 (예시:20191)", require
3032 return new ResponseEntity <ArrayList <Lecture >>(timeTableService .getLectureList (semester_date ), HttpStatus .OK );
3133 }
3234
35+ @ AuthExcept
36+ @ RequestMapping (value = "/semesters" , method = RequestMethod .GET )
37+ public @ ResponseBody
38+ ResponseEntity getSemesterList () throws Exception {
39+ return new ResponseEntity <ArrayList <Semester >>(timeTableService .getSemesterList (), HttpStatus .OK );
40+ }
41+
3342 @ ApiOperation (value = "" , authorizations = {@ Authorization (value ="Authorization" )})
3443 @ RequestMapping (value = "/timetables" , method = RequestMethod .GET )
3544 public @ ResponseBody
@@ -66,4 +75,6 @@ ResponseEntity deleteTimeTableAll(@ApiParam(value = "학기 (예시:20191)", req
6675 ResponseEntity deleteTimeTableById (@ ApiParam (value = "스케줄의 uid" , required = true ) @ RequestParam (value = "id" ) int id ) throws Exception {
6776 return new ResponseEntity <Map <String , Object >>(timeTableService .deleteTimeTableById (id ), HttpStatus .OK );
6877 }
78+
79+
6980}
0 commit comments