mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fix checkup test when registration is restricted #1185
This commit is contained in:
parent
5807b4dddf
commit
75cd470fb1
@ -287,6 +287,7 @@ var handleResponse = function (Env, req, res) {
|
||||
});
|
||||
return res.status(500).json({
|
||||
error: 'Execution error',
|
||||
errorCode: Util.serializeError(err)
|
||||
});
|
||||
}
|
||||
res.status(200).json(content);
|
||||
|
||||
@ -359,12 +359,12 @@ define([
|
||||
Block.writeLoginBlock({
|
||||
blockKeys: blockKeys,
|
||||
content: {}
|
||||
}, waitFor(function (e) {
|
||||
}, waitFor(function (e, obj) {
|
||||
// we should tolerate restricted registration
|
||||
// and proceed to clean up after any data we've created
|
||||
if (e === 'E_RESTRICTED') {
|
||||
if (e && obj && obj.errorCode === 'E_RESTRICTED') {
|
||||
restricted = true;
|
||||
return void cb(true);
|
||||
return;
|
||||
}
|
||||
if (e) {
|
||||
waitFor.abort();
|
||||
|
||||
@ -88,7 +88,7 @@ define([
|
||||
console.error(err);
|
||||
// there might be more info here
|
||||
if (data) { console.error(data); }
|
||||
return void cb("RESPONSE_REJECTED");
|
||||
return void cb("RESPONSE_REJECTED", data);
|
||||
}
|
||||
cb(void 0, data);
|
||||
}));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user