This repository was archived by the owner on May 22, 2021. It is now read-only.
API changes to accommodate 3rd party clients#683
Merged
dannycoates merged 2 commits intomozilla:masterfrom Jan 11, 2018
Merged
Conversation
dannycoates
suggested changes
Dec 21, 2017
Contributor
dannycoates
left a comment
There was a problem hiding this comment.
Thanks @ehuggett. These look like good changes, I just wonder about the types
server/routes/exists.js
Outdated
| const meta = await storage.metadata(id); | ||
| res.set('WWW-Authenticate', `send-v1 ${meta.nonce}`); | ||
| res.send({ | ||
| password: meta.pwd |
Contributor
There was a problem hiding this comment.
meta.pwd is a string iirc, '0' or '1'. It might be better to make the public type a boolean (or really anything besides '0' and '1') 😆
Contributor
Author
There was a problem hiding this comment.
oh dear that was a mess, string zero for false 😱 (I was ignorant about how redis stores values and assumed I would be retrieving an int, but I should have noticed the quotes in the output/json).
server/routes/metadata.js
Outdated
| res.send({ | ||
| metadata: meta.metadata, | ||
| dtotal: meta.dl, | ||
| dlimit: meta.dlimit, |
Contributor
There was a problem hiding this comment.
same as meta.pwd -- dtotal and dlimit should be numbers
Contributor
Author
|
Perhaps I should remove the changes to the metadata until #661 is resolved? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #618