Skip to content

Commit

Permalink
Remove old TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
System-Glitch committed Apr 10, 2024
1 parent 3cab9ad commit a842ccf
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 10 deletions.
2 changes: 0 additions & 2 deletions database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
errorutil "goyave.dev/goyave/v5/util/errors"
)

// TODO document there is no initializer and registered models anymore, the view interface has been removed, no auto migrations

// New create a new connection pool using the settings defined in the given configuration.
//
// In order to use a specific driver / dialect ("mysql", "sqlite3", ...), you must not
Expand Down
2 changes: 0 additions & 2 deletions database/paginator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"goyave.dev/goyave/v5/util/errors"
)

// TODO find a smooth way to convert a paginator's records to DTO (typeutil.Convert simply?)

// Paginator structure containing pagination information and result records.
type Paginator[T any] struct {
DB *gorm.DB `json:"-"`
Expand Down
4 changes: 0 additions & 4 deletions util/errors/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,3 @@ func (r Reason) Error() string {
func (r Reason) MarshalJSON() ([]byte, error) {
return json.Marshal(r.reason)
}

// TODO document exit codes are removed
// Exit code doesn't really bring value, the error message in the logs is more important
// The server now returns *errors.Error
2 changes: 1 addition & 1 deletion validation/size.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func validateSize(value any, v func(size int) bool) bool {
switch getFieldType(val) {
case FieldTypeString:
return v(uniseg.GraphemeClusterCount(value.(string)))
case FieldTypeArray, FieldTypeObject: // TODO document it also works for objects (number of keys)
case FieldTypeArray, FieldTypeObject:
return v(val.Len())
case FieldTypeFile:
files, _ := value.([]fsutil.File)
Expand Down
1 change: 0 additions & 1 deletion validation/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ func (v *validator) validateField(fieldName string, field *Field, walkData any,
Name: c.Name,
path: errorPath,
Invalid: !valid,
// TODO add validation errors Merge
}
validator.init(v.options) // TODO document a Rules or RuleSet is not meant to be re-used or used concurrently
ok := validator.Validate(ctx)
Expand Down

0 comments on commit a842ccf

Please sign in to comment.