From cae868bde52013dd403d349c0a359804f9512380 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 8 Oct 2024 14:28:27 +0200 Subject: [PATCH] Edited comment on method --- api/search.go | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/api/search.go b/api/search.go index de1a38b04..007c1de7c 100644 --- a/api/search.go +++ b/api/search.go @@ -50,24 +50,19 @@ func (r searchRoutes) searchSubtitles(c *gin.Context) { } /* -für alle: -q=...&limit=... - -Format für Semester:2024W -Format für Kurs: -Einzelnes Semester: -semester=... -firstSemester=1234X&lastSemester=1234X - -Mehrere Semester: -firstSemester=...&lastSemester=... -semester=...,..., max. 8 - -Einzelner oder Mehrere Kurse: -course=... -course=...,... max. 2 +Expected format for URL Parameters: +q=...&limit=... with q is the search query and limit is the maximum number of results + +If you want to search in only one semester you can add the following parameters: +semester=... or firstSemester=...&lastSemester=... with semester being the semester in the format +If you want to search in multiple semesters you can add the following parameters: +semester=..., ... with semester being a comma separated list of semesters in the format + +If you want to search in only one course you can add the following parameters: +course=... with course being the course in the format +If you want to search in multiple courses you can add the following parameters: +course=..., ... with course being a comma separated list of courses in the format */ - func (r searchRoutes) searchCourses(c *gin.Context) { user, query, limit := getDefaultParameters(c)