mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-12-23 13:43:46 +03:00
rewritten from net/http to fiber, changed port from 8080, 4662 to one 3000
This commit is contained in:
parent
16301a3428
commit
c09c3d7886
3 changed files with 0 additions and 85 deletions
|
@ -1,28 +0,0 @@
|
|||
package page
|
||||
|
||||
import (
|
||||
"github.com/Redume/EveryNasa/functions"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func AboutHandler(w http.ResponseWriter, r *http.Request) {
|
||||
con := functions.Connected()
|
||||
if con == false {
|
||||
http.ServeFile(w, r, "web/src/errors/504.html")
|
||||
return
|
||||
}
|
||||
|
||||
userAgent := r.UserAgent()
|
||||
if strings.Contains(userAgent, "Mobile") {
|
||||
http.ServeFile(w, r, "web/src/errors/mobile.html")
|
||||
return
|
||||
}
|
||||
|
||||
if r.URL.Path != "/about" {
|
||||
http.ServeFile(w, r, "web/src/errors/404.html")
|
||||
return
|
||||
}
|
||||
|
||||
http.ServeFile(w, r, "web/src/about.html")
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
package page
|
||||
|
||||
import (
|
||||
"github.com/Redume/EveryNasa/functions"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func GalleryHandler(w http.ResponseWriter, r *http.Request) {
|
||||
con := functions.Connected()
|
||||
if con == false {
|
||||
http.ServeFile(w, r, "web/src/errors/504.html")
|
||||
return
|
||||
}
|
||||
|
||||
userAgent := r.UserAgent()
|
||||
|
||||
if strings.Contains(userAgent, "Mobile") {
|
||||
http.ServeFile(w, r, "web/src/errors/mobile.html")
|
||||
return
|
||||
}
|
||||
|
||||
if r.URL.Path != "/" {
|
||||
http.ServeFile(w, r, "web/src/errors/404.html")
|
||||
return
|
||||
}
|
||||
|
||||
http.ServeFile(w, r, "web/src/gallery.html")
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package page
|
||||
|
||||
import (
|
||||
"github.com/Redume/EveryNasa/functions"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func SettingsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
con := functions.Connected()
|
||||
if con == false {
|
||||
http.ServeFile(w, r, "web/src/errors/504.html")
|
||||
return
|
||||
}
|
||||
|
||||
userAgent := r.UserAgent()
|
||||
if strings.Contains(userAgent, "Mobile") {
|
||||
http.ServeFile(w, r, "web/src/errors/mobile.html")
|
||||
return
|
||||
}
|
||||
|
||||
if r.URL.Path != "/settings" {
|
||||
http.ServeFile(w, r, "web/src/errors/404.html")
|
||||
return
|
||||
}
|
||||
|
||||
http.ServeFile(w, r, "web/src/settings.html")
|
||||
}
|
Loading…
Add table
Reference in a new issue