-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul tracker keys #773
Comments
What I'm going to do is to add a new endpoint and deprecate the current endpoint to generate keys The new endpoint can be used for both tasks: generate a random key or upload a pre-existing key. The URL: Upload Pre-existing KeyRequest body: {
"key": "pre_existing_key",
"seconds_valid": 3600
} If Create New Random KeyRequest body: {
"seconds_valid": 3600
}
cc @da2ce7 |
In the end, I changed the contract. Instead of omitting fields when they are not needed, you have to set them to curl -X POST http://localhost:1212/api/v1/keys?token=MyAccessToken \
-H "Content-Type: application/json" \
-d '{
"key": null,
"seconds_valid": null
}' ChatpGTP pros and cons for both options: 1. Omission of the FieldPros:
Cons:
2. Null ValuePros:
Cons:
When to Use Each Approach:
In summary, the choice between omission and using |
Related issues
The text was updated successfully, but these errors were encountered: