gitcoinco / gitcoinco/grants-stack-qf-calculator

Create the a handler to request a new result

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
engineering
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

route: PUT `/results/:chain_id/:round_id/:algorithm`

* validates parameters:
* requires chain_id to be a number
* requires round_id to be a valid hex string or compatible with all the ids we have
* requires algorithm (validate if it's included in `["cluster-matching", ...]` add others later)
* creates a new record in the `results` table setting:
* `created_at` to `now`
* `generated_at` to `null`
* `started_at` to `null`
* `finished_at` to `null`
* `last_requested_at` to `now`
* `file_url` to `null`

notes:

in the next tickets we will:
* validate if the round chainId/roundId exists
* check if a calculation already exists and redirect to its GET route

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.