Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Jul 12, 2024
1 parent 976789a commit 5be9e7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
8 changes: 3 additions & 5 deletions dist/drives.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ export function getSegmentMetadata(start, end, dongleId) {
to: end
});
}
export function getRoutesSegments(dongleId, start, end, limit) {
export function getRoutesSegments(dongleId, start, end, limit, route_str) {
return request.get(`v1/devices/${dongleId}/routes_segments`, {
start,
end,
limit
limit,
route_str
});
}
export function getRouteSegmentsById(dongleId, routeId) {
return request.get(`v1/devices/${dongleId}/routes_segments?route_str=${`${dongleId}|${routeId}`.replace(/%7C/g, '|')}`);
}
export function getRouteInfo(routeName) {
return request.get(`v1/route/${routeName}/`);
}
Expand Down
10 changes: 4 additions & 6 deletions src/drives.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ export function getSegmentMetadata(start, end, dongleId) {
});
}

export function getRoutesSegments(dongleId, start, end, limit) {
return request.get(`v1/devices/${dongleId}/routes_segments`, { start, end, limit });
}

export function getRouteSegmentsById(dongleId, routeId) {
return request.get(`v1/devices/${dongleId}/routes_segments?route_str=${`${dongleId}|${routeId}`.replace(/%7C/g, '|')}`);
export function getRoutesSegments(dongleId, start, end, limit, route_str) {
return request.get(`v1/devices/${dongleId}/routes_segments`, {
start, end, limit, route_str,
});
}

export function getRouteInfo(routeName) {
Expand Down

0 comments on commit 5be9e7f

Please sign in to comment.