move webserver files to ./web/
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crowsnest/internal/app"
|
||||
"crowsnest/internal/crawler"
|
||||
"crowsnest/internal/middleware"
|
||||
"crowsnest/internal/model"
|
||||
"crowsnest/internal/model/database"
|
||||
"crowsnest/internal/util"
|
||||
"crowsnest/web/app"
|
||||
"crowsnest/web/middleware"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"crowsnest/internal/html"
|
||||
"crowsnest/web/html"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
@@ -1,7 +1,7 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"crowsnest/internal/html"
|
||||
"crowsnest/web/html"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
@@ -37,6 +37,6 @@ func (app *App) Index(w http.ResponseWriter, req *http.Request) {
|
||||
err = html.IndexLayout(articleVMs, uint(pageId+1), totalCount+1).Render(w)
|
||||
if err != nil {
|
||||
http.Error(w, "Failed to render template", http.StatusInternalServerError)
|
||||
return
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"crowsnest/internal/html"
|
||||
"crowsnest/web/html"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -27,6 +27,6 @@ func (app *App) UpSearch(w http.ResponseWriter, req *http.Request) {
|
||||
err = html.IndexLayout(articleVMs, 0, 0).Render(w)
|
||||
if err != nil {
|
||||
http.Error(w, "Failed to render template", http.StatusInternalServerError)
|
||||
return
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user