mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
serve with metadata
This commit is contained in:
parent
3346108594
commit
4c454d5d08
@ -2,7 +2,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const COLUMNS = ['app_name', 'created_at', 'updated_at', 'description', 'strategies', 'url', 'color', 'icon'];
|
const COLUMNS = ['app_name', 'created_at', 'updated_at', 'description', 'strategies', 'url', 'color', 'icon'];
|
||||||
const COLUMNS_LIST = ['app_name', 'created_at', 'strategies'];
|
|
||||||
const TABLE = 'client_applications';
|
const TABLE = 'client_applications';
|
||||||
|
|
||||||
const mapRow = (row) => ({
|
const mapRow = (row) => ({
|
||||||
@ -61,7 +60,7 @@ class ClientApplicationsDb {
|
|||||||
|
|
||||||
getAll () {
|
getAll () {
|
||||||
return this.db
|
return this.db
|
||||||
.select(COLUMNS_LIST)
|
.select(COLUMNS)
|
||||||
.from(TABLE)
|
.from(TABLE)
|
||||||
.map(mapRow);
|
.map(mapRow);
|
||||||
}
|
}
|
||||||
@ -86,7 +85,7 @@ class ClientApplicationsDb {
|
|||||||
*/
|
*/
|
||||||
getAppsForStrategy (strategyName) {
|
getAppsForStrategy (strategyName) {
|
||||||
return this.db
|
return this.db
|
||||||
.select(COLUMNS_LIST)
|
.select(COLUMNS)
|
||||||
.from(TABLE)
|
.from(TABLE)
|
||||||
.map(mapRow)
|
.map(mapRow)
|
||||||
.then(apps => apps
|
.then(apps => apps
|
||||||
|
Loading…
Reference in New Issue
Block a user