Browse Source

time is now updateTime

pull/18/head
Jannik 3 years ago
parent
commit
f9f0564a91
  1. 4
      src/main/kotlin/org/mosad/thecitadelofricks/APIController.kt
  2. 4
      src/main/kotlin/org/mosad/thecitadelofricks/DataTypes.kt

4
src/main/kotlin/org/mosad/thecitadelofricks/APIController.kt

@ -86,13 +86,13 @@ class APIController {
@RequestMapping("/courses")
fun courses(): CoursesList {
logger.info("courses request at ${LocalDateTime.now()}!")
return CoursesList(CoursesMeta(coursesLinkList.size, coursesLastUpdate), coursesLinkList)
return CoursesList(CoursesMeta(coursesLastUpdate, coursesLinkList.size), coursesLinkList)
}
@RequestMapping("/mensamenu")
fun mensamenu(): Mensa {
logger.info("mensamenu request at ${LocalDateTime.now()}!")
return Mensa(MensaMeta(mensaName, mensaLastUpdate), mensaCurrentWeek, mensaNextWeek)
return Mensa(MensaMeta(mensaLastUpdate, mensaName), mensaCurrentWeek, mensaNextWeek)
}
@RequestMapping("/timetable")

4
src/main/kotlin/org/mosad/thecitadelofricks/DataTypes.kt

@ -28,7 +28,7 @@ import java.util.*
// data classes for the course part
data class Course(val courseName: String, val courseLink: String)
data class CoursesMeta(val totalCourses: Int, val time: Long)
data class CoursesMeta(val updateTime: Long, val totalCourses: Int)
data class CoursesList(val meta: CoursesMeta, val courses: ArrayList<Course>)
@ -39,7 +39,7 @@ data class Meals(val meals: ArrayList<Meal>)
data class MensaWeek(val days: Array<Meals> = Array(7) { Meals(ArrayList()) })
data class MensaMeta(val mensaName: String, val time: Long)
data class MensaMeta(val updateTime: Long, val mensaName: String)
data class Mensa(val meta: MensaMeta, val currentWeek: MensaWeek, val nextWeek: MensaWeek)

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close