Skip to content
Snippets Groups Projects
Commit 0a10c542 authored by Zachary Carter's avatar Zachary Carter
Browse files

Requests for internal wsapis return 404

parent f8cf28a2
No related branches found
No related tags found
No related merge requests found
......@@ -346,7 +346,7 @@ exports.routeSetup = function (app, options) {
}
if (api.internal) {
return httputils.badRequest(resp, "internal api");
return httputils.notFound(resp);
}
var destination_url = api.writes_db ? options.write_url + "/wsapi/" + operation
......
#!/usr/bin/env node
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
require('./lib/test_env.js');
const
assert = require('assert'),
vows = require('vows'),
start_stop = require('./lib/start-stop.js'),
wsapi = require('./lib/wsapi.js');
var suite = vows.describe('internal-wsapi');
// disable vows (often flakey?) async error behavior
suite.options.error = false;
start_stop.addStartupBatches(suite);
suite.addBatch({
"requesting to create an account with an assertion": {
topic: wsapi.post('/wsapi/create_account_with_assertion', { }),
"returns a 404": function(err, r) {
assert.strictEqual(r.code, 404);
}
}
});
start_stop.addShutdownBatches(suite);
// run or export the suite.
if (process.argv[1] === __filename) suite.run();
else suite.export(module);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment