mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 04:16:46 +00:00
Rewrote search func
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
var endpoint = require('./endpoint.js');
|
||||
var auth = require('../../core/jwt_auth.js').auth;
|
||||
var sql = require('./sql.js');
|
||||
|
||||
var RegisterAPI = function(app, api) {
|
||||
endpoint.Register(app, api, 'item', 'items', 'id');
|
||||
|
||||
//Can register custom controller actions here.
|
||||
app.post('/api/data/item/search', auth, function (req, res) {
|
||||
sql.Search(req, res, 'items', 'id', ['id', 'name']);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
'Register': RegisterAPI
|
||||
}
|
||||
Reference in New Issue
Block a user