Rank 2: Process
two questions. the Server SDK for NodeJS says that if I want to do a 'verification' i think that means to set a users 'verified' status, the first parameter is a URL?! see sample.
secondly, to update a document i have to know the document id? can't i just query for it? i suppose i can, if the next parameter is an array of Query objects, but it should be documented. UPDATE: nope. i can't.
this should work, but
80 databases.getDocument('cryptfire', 'api', [
81 Query.equal('key', apikey)
82 ]);
it may make more sense in this case
80 databases.updateDocument('cryptfire', 'api', [
81 Query.equal('key', apikey)
82 ]);
because then you can do this, although it probably isn't best practice
try {
databases.getDocument('cryptfire', 'api', [
Query.equal('key', apikey)
]);
// do here what you gotta do
} catch (err) {
res.send('wrong apikey');
}
thx & sry