fix int overflow

This commit is contained in:
landrigun 2025-01-08 10:32:22 +00:00
parent 30f0aa51b6
commit ff1bb89449
2 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ func (uf *UploadForm) IntoResource() *services.Resource {
Name: uf.Name.Value,
Editor: uf.Editor.Value,
Authors: uf.Authors.Value,
Year: uint16(uf.Year.Value),
Year: uf.Year.Value,
Keywords: nil,
Content: bytes.NewBuffer(uf.File.Value.content),
}

View File

@ -80,7 +80,7 @@ type Resource struct {
Description *string
Editor string
Authors []string
Year uint16
Year int
Keywords []string
Content *bytes.Buffer
Path string