chore: Upgrade Flow to v0.104.0
This commit is contained in:
@ -16,9 +16,8 @@ export default function pagination(options?: Object) {
|
||||
};
|
||||
|
||||
let query = ctx.request.query;
|
||||
|
||||
// $FlowFixMe
|
||||
let body = ctx.request.body;
|
||||
|
||||
// $FlowFixMe
|
||||
let limit = query.limit || body.limit;
|
||||
// $FlowFixMe
|
||||
@ -48,15 +47,20 @@ export default function pagination(options?: Object) {
|
||||
);
|
||||
}
|
||||
|
||||
/* $FlowFixMeNowPlease This comment suppresses an error found when upgrading
|
||||
* flow-bin@0.104.0. To view the error, delete this comment and run Flow. */
|
||||
ctx.state.pagination = {
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
limit,
|
||||
offset,
|
||||
};
|
||||
|
||||
// $FlowFixMe
|
||||
query.limit = ctx.state.pagination.limit;
|
||||
// $FlowFixMe
|
||||
query.offset = ctx.state.pagination.offset + query.limit;
|
||||
|
||||
/* $FlowFixMeNowPlease This comment suppresses an error found when upgrading
|
||||
* flow-bin@0.104.0. To view the error, delete this comment and run Flow. */
|
||||
ctx.state.pagination.nextPath = `/api${
|
||||
ctx.request.path
|
||||
}?${querystring.stringify(query)}`;
|
||||
|
Reference in New Issue
Block a user