Skip to content

Commit

Permalink
technical debt
Browse files Browse the repository at this point in the history
  • Loading branch information
e154 committed Jan 22, 2024
1 parent 0229b65 commit 1670b1b
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 34 deletions.
4 changes: 2 additions & 2 deletions api/api.swagger3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4292,7 +4292,7 @@ components:
format: uint64
description: The number of results returned on a page
ids:
name: ids
name: ids[]
in: query
required: false
schema:
Expand All @@ -4316,7 +4316,7 @@ components:
type: string
format: date-time
entityIds:
name: entityId
name: entityId[]
in: query
required: false
schema:
Expand Down
30 changes: 15 additions & 15 deletions api/stub/server.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions api/stub/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions db/entity_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ func (n *EntityStorages) List(ctx context.Context, limit, offset int, orderBy, s
q := n.Db.WithContext(ctx).Model(&EntityStorage{})

if len(entityIds) > 0 {
var ids = make([]string, 0, len(entityIds))
for _, id := range entityIds {
ids = append(ids, id.String())
}
q = q.Where("entity_id in (?)", ids)
q = q.Where("entity_id in (?)", entityIds)
}

if startDate != nil {
Expand Down
10 changes: 5 additions & 5 deletions static_source/admin/src/api/stub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
*/
limit?: number;
/** The number of results returned on a page */
ids?: number[];
"ids[]"?: number[];
},
params: RequestParams = {},
) =>
Expand Down Expand Up @@ -2445,7 +2445,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
*/
limit?: number;
/** The number of results returned on a page */
ids?: number[];
"ids[]"?: number[];
},
params: RequestParams = {},
) =>
Expand Down Expand Up @@ -3822,7 +3822,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
startDate?: string;
/** @format date-time */
endDate?: string;
entityId?: string[];
"entityId[]"?: string[];
},
params: RequestParams = {},
) =>
Expand Down Expand Up @@ -5172,7 +5172,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
*/
limit?: number;
/** The number of results returned on a page */
ids?: number[];
"ids[]"?: number[];
query?: string;
},
params: RequestParams = {},
Expand Down Expand Up @@ -5733,7 +5733,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
*/
limit?: number;
/** The number of results returned on a page */
ids?: number[];
"ids[]"?: number[];
},
params: RequestParams = {},
) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface Params {
page?: number;
limit?: number;
sort?: string;
entityId?: string;
entityId?: string[];
startDate?: string;
endDate?: string;
}
Expand Down Expand Up @@ -189,7 +189,7 @@ const getList = debounce( async () => {
if (props.item?.payload.entityStorage?.entityIds?.length ) {
if (selectedEntities.value.length == 0) {
params.entityId = props.item?.payload.entityStorage?.entityIds.join(",")
params.entityId = props.item?.payload.entityStorage
} else {
params.entityId = selectedEntities.value
}
Expand Down

0 comments on commit 1670b1b

Please sign in to comment.