mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-17 02:16:54 +00:00
lmao time.UnixDate sounds like a great idea doesn't it
This commit is contained in:
parent
b22efabfed
commit
1a709d6e51
3 changed files with 17 additions and 10 deletions
|
@ -241,11 +241,13 @@ func HTTPBackendCachedPublish(w http.ResponseWriter, r *http.Request) {
|
|||
channel := formData.Get("channel")
|
||||
deleteMode := formData.Get("delete") != ""
|
||||
timeStr := formData.Get("time")
|
||||
timestamp, err := time.Parse(time.UnixDate, timeStr)
|
||||
timeNum, err := strconv.ParseInt(timeStr, 10, 64)
|
||||
if err != nil {
|
||||
w.WriteHeader(422)
|
||||
fmt.Fprintf(w, "error parsing time: %v", err)
|
||||
return
|
||||
}
|
||||
timestamp := time.Unix(timeNum, 0)
|
||||
|
||||
cacheinfo, ok := S2CCommandsCacheInfo[cmd]
|
||||
if !ok {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue