+let serverAccount: AccountInstance
+async function getServerAccount () {
+ if (serverAccount === undefined) {
+ serverAccount = await db.Account.loadApplication()
+ }
+
+ if (!serverAccount) {
+ logger.error('Cannot load server account.')
+ process.exit(0)
+ }
+
+ return Promise.resolve(serverAccount)
+}
+
+type SortType = { sortModel: any, sortValue: string }
+