Added lyrics display

This commit is contained in:
2018-04-13 12:20:13 +02:00
parent 16d0e17aa5
commit 06c09bc1ff
8 changed files with 100 additions and 21 deletions

View File

@ -10,8 +10,6 @@ import (
"github.com/animenotifier/notify.moe/utils"
)
const maxDescriptionLength = 170
// Get renders a company page.
func Get(ctx *aero.Context) string {
user := utils.GetUser(ctx)
@ -22,11 +20,7 @@ func Get(ctx *aero.Context) string {
return ctx.Error(http.StatusNotFound, "Company not found", err)
}
description := company.Description
if len(description) > maxDescriptionLength {
description = description[:maxDescriptionLength-3] + "..."
}
description := utils.CutLongDescription(company.Description)
openGraph := &arn.OpenGraph{
Tags: map[string]string{