CodeChain-io / CodeChain-io/codechain-indexer
Validate `firstEvaluatedKey` and `lastEvaluatedKey`'s length
Abierto
- Lenguaje dominante
- TypeScript
- Estrellas
- 21
- Forks
- 15
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.