chore: developer cleanup (#300)

* new PR tasks

* add homebox to know words

* formatting

* bump deps

* generate db models

* ts errors

* drop id

* fix accessor

* drop unused time field

* change CI

* add expected error

* add type check

* resolve serveral type errors

* hoise in CI
This commit is contained in:
Hayden 2023-02-17 21:41:01 -09:00 committed by GitHub
parent 88f9ff90d4
commit bd321af29f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
142 changed files with 817 additions and 1200 deletions

View file

@ -76,9 +76,7 @@ type (
}
)
var (
mapToGroupErr = mapTErrFunc(mapToGroup)
)
var mapToGroupErr = mapTErrFunc(mapToGroup)
func mapToGroup(g *ent.Group) Group {
return Group{
@ -90,9 +88,7 @@ func mapToGroup(g *ent.Group) Group {
}
}
var (
mapToGroupInvitationErr = mapTErrFunc(mapToGroupInvitation)
)
var mapToGroupInvitationErr = mapTErrFunc(mapToGroupInvitation)
func mapToGroupInvitation(g *ent.GroupInvitationToken) GroupInvitation {
return GroupInvitation{
@ -118,7 +114,6 @@ func (r *GroupRepository) StatsLocationsByPurchasePrice(ctx context.Context, GID
return sql.As(sql.Sum(t.C(item.FieldPurchasePrice)), "total")
}).
Scan(ctx, &v)
if err != nil {
return nil, err
}
@ -145,7 +140,6 @@ func (r *GroupRepository) StatsLabelsByPurchasePrice(ctx context.Context, GID uu
return sql.As(sql.Sum(itemTable.C(item.FieldPurchasePrice)), "total")
}).
Scan(ctx, &v)
if err != nil {
return nil, err
}
@ -283,7 +277,6 @@ func (r *GroupRepository) InvitationCreate(ctx context.Context, groupID uuid.UUI
SetExpiresAt(invite.ExpiresAt).
SetUses(invite.Uses).
Save(ctx)
if err != nil {
return GroupInvitation{}, err
}