mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-11-02 01:24:52 +00:00
feat/367 added support for name query parameter for retrieving application (#368)
* feat/367 added support for name query parameter for getting application by name * feat/367 - Updated test case and modified retrieveAll method to make name independent of service_provider_id and account_sid * updated query to use WHERE 1=1 to avoid whereFlag variable * feat/367: removed empty line added accidently
This commit is contained in:
1 parent
e080118b6a
commit
8851b3fac0
3 files changed
+31
-6
No files matched your search
@@ -156,7 +156,8 @@ router.get('/', async(req, res) => {
|
||||
try {
|
||||
const service_provider_sid = req.user.hasServiceProviderAuth ? req.user.service_provider_sid : null;
|
||||
const account_sid = req.user.hasAccountAuth ? req.user.account_sid : null;
|
||||
const results = await Application.retrieveAll(service_provider_sid, account_sid);
|
||||
const name = req.query.name;
|
||||
const results = await Application.retrieveAll(service_provider_sid, account_sid, name);
|
||||
res.status(200).json(results);
|
||||
} catch (err) {
|
||||
sysError(logger, res, err);
|
||||
|
||||
Reference in new issue
Block a user