CodeChain-io / CodeChain-io/codechain-indexer
Validate `firstEvaluatedKey` and `lastEvaluatedKey`'s length
未关闭
- 主要语言
- TypeScript
- 星标
- 21
- 派生
- 15
- PR 合并指标
- 30 天内没有已合并 PR
描述
Here is the code that validates `firstEvaluatedKey` and `lastEvaluatedKey`.
```
export const txPaginationSchema = {
firstEvaluatedKey: Joi.array().items(Joi.number(), Joi.number()),
lastEvaluatedKey: Joi.array().items(Joi.number(), Joi.number())
};
```
The above condition does not check an input array's length. All of these inputs `[]`, `[1]`, `[1,2]` and `[1,2,3]` are valid in the current implementation. Only `[1,2]` should pass the validation and other `[]`, `[1]`, `[1,2,3]` should fail the validation.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先定位 issue 中所示的 txPaginationSchema 定义,并检查附近的验证测试或使用情况。验证该 schema 对空数组以及包含一个、两个和三个元素的数组的行为;完成的标准是两个键都只接受包含两个元素的情况。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100