mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 16:58:02 +00:00
Changed searching to be simplier since I don't think we'll need much more
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
var auth = require('../../core/jwt_auth.js').auth;
|
||||
var sql = require('./sql.js');
|
||||
|
||||
var RegisterEndpoint = function(app, api, single_name, plural_name, pkey) {
|
||||
var RegisterEndpoint = function(app, api, single_name, plural_name, pkey, skeys) {
|
||||
app.get('/api/data/' + single_name + '/:' + pkey, auth, function (req, res) {
|
||||
sql.Retrieve(req, res, plural_name, pkey);
|
||||
});
|
||||
@@ -15,7 +15,7 @@ var RegisterEndpoint = function(app, api, single_name, plural_name, pkey) {
|
||||
});
|
||||
|
||||
app.post('/api/data/' + single_name + '/search', auth, function (req, res) {
|
||||
sql.Search(req, res, plural_name, pkey, res);
|
||||
sql.Search(req, res, plural_name, pkey, skeys);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user