mirror of
https://github.com/emo2007/block-accounting.git
synced 2025-04-12 08:56:28 +00:00
empty dates mapping big fixed
This commit is contained in:
parent
3896e5cbfe
commit
b2bef0111a
@ -71,7 +71,6 @@ func (c *organizationsController) ListOrganizations(w http.ResponseWriter, r *ht
|
|||||||
return nil, fmt.Errorf("error fetch user from context. %w", err)
|
return nil, fmt.Errorf("error fetch user from context. %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// BUG: empty created_at and updfated_at
|
|
||||||
resp, err := c.orgInteractor.List(ctx, organizations.ListParams{
|
resp, err := c.orgInteractor.List(ctx, organizations.ListParams{
|
||||||
UserId: user.Id(),
|
UserId: user.Id(),
|
||||||
Cursor: req.Cursor,
|
Cursor: req.Cursor,
|
||||||
|
@ -64,9 +64,11 @@ func (p *organizationsPresenter) Organizations(orgs []*models.Organization) []do
|
|||||||
|
|
||||||
for i, o := range orgs {
|
for i, o := range orgs {
|
||||||
out[i] = domain.Organization{
|
out[i] = domain.Organization{
|
||||||
Id: o.ID.String(),
|
Id: o.ID.String(),
|
||||||
Name: o.Name,
|
Name: o.Name,
|
||||||
Address: o.Address,
|
Address: o.Address,
|
||||||
|
CreatedAt: uint64(o.CreatedAt.UnixMilli()),
|
||||||
|
UpdatedAt: uint64(o.UpdatedAt.UnixMilli()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,6 @@ func (i *organizationsInteractor) List(
|
|||||||
|
|
||||||
var nextCursor string
|
var nextCursor string
|
||||||
|
|
||||||
// BUG: pagination by cursor works with errors. empty set as return value
|
|
||||||
if len(orgs) >= 50 || len(orgs) >= int(params.Limit) {
|
if len(orgs) >= 50 || len(orgs) >= int(params.Limit) {
|
||||||
cursor.Id = orgs[len(orgs)-1].ID
|
cursor.Id = orgs[len(orgs)-1].ID
|
||||||
if nextCursor, err = cursor.encode(); err != nil {
|
if nextCursor, err = cursor.encode(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user