Skip to content

Commit

Permalink
replaced Defacto2.sceners package
Browse files Browse the repository at this point in the history
with Defacto2.releaser.
  • Loading branch information
bengarrett committed Oct 7, 2023
1 parent 275f96e commit 9270a85
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 113 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/Defacto2/server
go 1.21

require (
github.com/Defacto2/sceners v0.0.2
github.com/Defacto2/releaser v0.5.0
github.com/caarlos0/env/v7 v7.1.0
github.com/carlmjohnson/versioninfo v0.22.5
github.com/evanw/esbuild v0.18.15
Expand Down
18 changes: 2 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1MRDJM=
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/Defacto2/sceners v0.0.2 h1:nd3kUJuHKtm24pBxH2Nmg5+vI88jMs2v2z57z22KHJw=
github.com/Defacto2/sceners v0.0.2/go.mod h1:8q8aIZ5C3lCa1PuWE6jcjH4ztye+xDPaEHUmZgDNjr8=
github.com/Defacto2/releaser v0.5.0 h1:0sDQFh7Mquzo6b2KzEDz7cT4MG5PWpFPkGR5l+doXXU=
github.com/Defacto2/releaser v0.5.0/go.mod h1:qotKWtxM+tbp7uQaMX1/EiV+h0JoyujFn+4bxkWSihA=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk=
Expand All @@ -81,8 +81,6 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV
github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
Expand Down Expand Up @@ -516,8 +514,6 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c=
go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk=
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
Expand All @@ -535,8 +531,6 @@ golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand All @@ -549,8 +543,6 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ=
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
Expand Down Expand Up @@ -628,8 +620,6 @@ golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
Expand Down Expand Up @@ -752,8 +742,6 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand All @@ -767,8 +755,6 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
6 changes: 3 additions & 3 deletions handler/app/funchtml.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"time"

"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/config"
"github.com/Defacto2/server/internal/fmts"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/tags"
"github.com/volatiletech/null/v8"
Expand Down Expand Up @@ -364,14 +364,14 @@ func LinkRelrs(a, b any) template.HTML {
if err != nil {
return template.HTML(fmt.Sprintf("error: %s", err))
}
prime = fmt.Sprintf(`<a class="%s" href="%s">%s</a>`, class, ref, fmts.Name(helper.Slug(av)))
prime = fmt.Sprintf(`<a class="%s" href="%s">%s</a>`, class, ref, releaser.Link(helper.Slug(av)))
}
if bv != "" {
ref, err := linkRelr(bv)
if err != nil {
return template.HTML(fmt.Sprintf("error: %s", err))
}
second = fmt.Sprintf(`<a class="%s" href="%s">%s</a>`, class, ref, fmts.Name(helper.Slug(bv)))
second = fmt.Sprintf(`<a class="%s" href="%s">%s</a>`, class, ref, releaser.Link(helper.Slug(bv)))
}
if prime != "" && second != "" {
s = fmt.Sprintf("%s<br>+ %s", prime, second)
Expand Down
4 changes: 2 additions & 2 deletions handler/app/funcmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package app
import (
"html/template"

"github.com/Defacto2/server/internal/fmts"
"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/initialism"
)
Expand All @@ -31,7 +31,7 @@ func (web Web) TemplateFuncMap() template.FuncMap {
"fmtMonth": Month,
"fmtPrefix": Prefix,
"fmtRoles": helper.FmtSlice,
"fmtURI": fmts.Name,
"fmtURI": releaser.Link,
"initialisms": initialism.Join,
"lastUpdated": LastUpdated,
"linkDownload": LinkDownload,
Expand Down
6 changes: 3 additions & 3 deletions handler/app/render_err.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"net/http"
"strings"

"github.com/Defacto2/sceners/pkg/rename"
"github.com/Defacto2/releaser"
"github.com/labstack/echo/v4"
"go.uber.org/zap"
)
Expand Down Expand Up @@ -164,7 +164,7 @@ func ReleaserErr(z *zap.SugaredLogger, c echo.Context, id string) error {
data["description"] = fmt.Sprintf("HTTP status %d error", http.StatusNotFound)
data["code"] = http.StatusNotFound
data["logo"] = "Releaser not found"
data["alert"] = fmt.Sprintf("Releaser %q cannot be found", rename.DeObfuscateURL(id))
data["alert"] = fmt.Sprintf("Releaser %q cannot be found", releaser.Humanize(id))
data["probl"] = "The releaser page does not exist, there is probably a typo with the URL."
data["uriOkay"] = "g/"
data["uriErr"] = id
Expand All @@ -189,7 +189,7 @@ func ScenerErr(z *zap.SugaredLogger, c echo.Context, id string) error {
data["description"] = fmt.Sprintf("HTTP status %d error", http.StatusNotFound)
data["code"] = http.StatusNotFound
data["logo"] = "Scener not found"
data["alert"] = fmt.Sprintf("Scener %q cannot be found", rename.DeObfuscateURL(id))
data["alert"] = fmt.Sprintf("Scener %q cannot be found", releaser.Humanize(id))
data["probl"] = "The scener page does not exist, there is probably a typo with the URL."
data["uriOkay"] = "p/"
data["uriErr"] = id
Expand Down
6 changes: 3 additions & 3 deletions handler/app/render_files.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"net/http"
"strconv"

"github.com/Defacto2/server/internal/fmts"
"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/initialism"
"github.com/Defacto2/server/internal/postgres"
Expand Down Expand Up @@ -167,7 +167,7 @@ func Sceners(z *zap.SugaredLogger, c echo.Context, uri string) error {
}
defer db.Close()

s := fmts.Name(uri)
s := releaser.Link(uri)
var rel model.Scener
fs, err := rel.List(ctx, db, uri)
if err != nil {
Expand Down Expand Up @@ -226,7 +226,7 @@ func Releasers(z *zap.SugaredLogger, c echo.Context, uri string) error {
}
defer db.Close()

s := fmts.Name(uri)
s := releaser.Link(uri)
rel := model.Releasers{}
fs, err := rel.List(ctx, db, uri)
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions handler/app/render_releaser.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,16 @@ func mag(z *zap.SugaredLogger, c echo.Context, chronological bool) error {

// Releaser is the handler for the releaser page ordered by the most files.
func Releaser(z *zap.SugaredLogger, c echo.Context) error {
return releaser(z, c, true)
return rel(z, c, true)
}

// ReleaserAZ is the handler for the releaser page ordered alphabetically.
func ReleaserAZ(z *zap.SugaredLogger, c echo.Context) error {
return releaser(z, c, false)
return rel(z, c, false)
}

// releaser is the handler for the Releaser page.
func releaser(z *zap.SugaredLogger, c echo.Context, prolific bool) error {
// rel is the handler for the Releaser page.
func rel(z *zap.SugaredLogger, c echo.Context, prolific bool) error {
const title, name = "Releaser", "releaser"
if z == nil {
return InternalErr(z, c, name, ErrZap)
Expand Down
4 changes: 2 additions & 2 deletions handler/app/render_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strings"

"github.com/Defacto2/server/internal/fmts"
"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/initialism"
"github.com/Defacto2/server/internal/postgres"
Expand Down Expand Up @@ -141,7 +141,7 @@ func SearchReleaser(z *zap.SugaredLogger, c echo.Context) error {
for i, v := range x {
id := strings.TrimSpace(v.Name)
slug := helper.Slug(id)
name := fmts.Name(slug)
name := releaser.Link(slug)
ism := initialism.Initialism(slug)
opt := name
if len(ism) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions handler/html3/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"time"

"github.com/Defacto2/sceners"
"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/postgres"
"github.com/Defacto2/server/internal/postgres/models"
Expand Down Expand Up @@ -90,7 +90,7 @@ func (s *sugared) List(c echo.Context, tt RecordsBy) error {
}
}

name := sceners.CleanURL(id)
name := releaser.Clean(id)
ctx := context.Background()
db, err := postgres.ConnectDB()
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions handler/html3/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"html/template"
"strings"

"github.com/Defacto2/server/internal/fmts"
"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/tags"
"github.com/Defacto2/server/model"
"go.uber.org/zap"
Expand All @@ -32,7 +32,7 @@ func TemplateFuncMap(z *zap.SugaredLogger) template.FuncMap {
"leading": Leading,
"fmtByte": LeadFS,
"fmtURI": func(uri string) string {
return fmts.Name(uri)
return releaser.Link(uri)
},
"byteInt": LeadFSInt,
"leadInt": LeadInt,
Expand Down
66 changes: 0 additions & 66 deletions internal/fmts/fmts.go

This file was deleted.

4 changes: 2 additions & 2 deletions model/releaser.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"database/sql"
"strings"

"github.com/Defacto2/sceners/pkg/rename"
"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/postgres"
"github.com/Defacto2/server/internal/postgres/models"
Expand Down Expand Up @@ -59,7 +59,7 @@ func (r *Releasers) List(ctx context.Context, db *sql.DB, name string) (models.F
if db == nil {
return nil, ErrDB
}
n := strings.ToUpper(rename.DeObfuscateURL(name))
n := strings.ToUpper(releaser.Humanize(name))
x := null.StringFrom(n)
return models.Files(
qm.Where("upper(group_brand_for) = ? OR upper(group_brand_by) = ?", x, x),
Expand Down
6 changes: 3 additions & 3 deletions model/releaser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"testing"

"github.com/Defacto2/sceners"
"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/postgres"
"github.com/Defacto2/server/model"
Expand All @@ -26,9 +26,9 @@ func TestAllSlugs(t *testing.T) {
log.Fatal(err)
}
for _, x := range g {
og := sceners.CleanURL(x.Unique.Name)
og := releaser.Clean(x.Unique.Name)
y := helper.Slug(og)
z := sceners.CleanURL(y)
z := releaser.Clean(y)
assert.Equal(t, og, z, "slug is "+y)
}
}
4 changes: 2 additions & 2 deletions model/scener.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strings"

"github.com/Defacto2/sceners/pkg/rename"
"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/helper"
"github.com/Defacto2/server/internal/postgres"
"github.com/Defacto2/server/internal/postgres/models"
Expand All @@ -33,7 +33,7 @@ func (s *Scener) List(ctx context.Context, db *sql.DB, name string) (models.File
}

func ScenerSQL(name string) string {
n := strings.ToUpper(rename.DeObfuscateURL(name))
n := strings.ToUpper(releaser.Humanize(name))
exact := fmt.Sprintf("(upper(credit_text) = '%s')"+
" OR (upper(credit_program) = '%s')"+
" OR (upper(credit_illustration) = '%s')"+
Expand Down
4 changes: 2 additions & 2 deletions model/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strings"

"github.com/Defacto2/sceners/pkg/rename"
"github.com/Defacto2/releaser"
"github.com/Defacto2/server/internal/postgres"
"github.com/Defacto2/server/internal/postgres/models"
"github.com/volatiletech/null/v8"
Expand Down Expand Up @@ -104,7 +104,7 @@ func (s *Summary) Releaser(ctx context.Context, db *sql.DB, name string) error {
if db == nil {
return ErrDB
}
n := strings.ToUpper(rename.DeObfuscateURL(name))
n := strings.ToUpper(releaser.Humanize(name))
x := null.StringFrom(n)
return models.NewQuery(
qm.Select(postgres.Columns()...),
Expand Down

0 comments on commit 9270a85

Please sign in to comment.