Performance improvement for users page
This commit is contained in:
21
pages/company/company.go
Normal file
21
pages/company/company.go
Normal file
@ -0,0 +1,21 @@
|
||||
package company
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
)
|
||||
|
||||
// Get company.
|
||||
func Get(ctx *aero.Context) string {
|
||||
id := ctx.Get("id")
|
||||
company, err := arn.GetCompany(id)
|
||||
|
||||
if err != nil {
|
||||
return ctx.Error(http.StatusNotFound, "Company not found", err)
|
||||
}
|
||||
|
||||
return ctx.HTML(components.CompanyPage(company))
|
||||
}
|
2
pages/company/company.pixy
Normal file
2
pages/company/company.pixy
Normal file
@ -0,0 +1,2 @@
|
||||
component CompanyPage(company *arn.Company)
|
||||
h1= company.Name.English
|
Reference in New Issue
Block a user