mirror of
https://github.com/LeRoid-hub/Mensa-API.git
synced 2025-01-31 03:34:57 +00:00
some small fixes
This commit is contained in:
parent
62577d4c41
commit
df24f7989f
@ -5,13 +5,12 @@ import (
|
||||
"mensa/cache"
|
||||
"mensa/fetch"
|
||||
"mensa/scrape"
|
||||
"mensa/types"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
var c = cache.NewCache()
|
||||
var ca = cache.NewCache()
|
||||
|
||||
func Run() {
|
||||
r := gin.Default()
|
||||
@ -28,8 +27,8 @@ func bundesland(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if c.GetCacheData(bundesland) != "" {
|
||||
return c.GetCacheData(bundesland)
|
||||
if ca.GetCacheData(bundesland) != "" {
|
||||
return ca.GetCacheData(bundesland)
|
||||
}
|
||||
|
||||
resp, err := fetch.Fetch("bl/" + bundesland)
|
||||
|
Loading…
Reference in New Issue
Block a user