mirror of
https://github.com/Starlio-app/StarlioX
synced 2025-02-22 23:13:12 +03:00
Logs added
This commit is contained in:
parent
35adbe07ff
commit
3b8e630d4a
2 changed files with 33 additions and 34 deletions
|
@ -2,15 +2,14 @@ package controllers
|
|||
|
||||
import (
|
||||
"github.com/Redume/EveryNasa/api/utils"
|
||||
"github.com/Redume/EveryNasa/functions"
|
||||
"github.com/reujab/wallpaper"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
var WallpaperUpdate = func(w http.ResponseWriter, r *http.Request) {
|
||||
var url string
|
||||
|
||||
url = r.FormValue("url")
|
||||
|
||||
if url == "" {
|
||||
utils.Respond(w, utils.Message(false, "URL is required"))
|
||||
return
|
||||
|
@ -18,6 +17,6 @@ var WallpaperUpdate = func(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
err := wallpaper.SetFromURL(url)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
functions.Logger(err.Error())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue