summaryrefslogtreecommitdiff
path: root/src/models
diff options
context:
space:
mode:
Diffstat (limited to 'src/models')
-rw-r--r--src/models/app.ts10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/models/app.ts b/src/models/app.ts
index 01cc946c6e..c0b2b5a0f3 100644
--- a/src/models/app.ts
+++ b/src/models/app.ts
@@ -5,8 +5,6 @@ import db from '../db/mongodb';
import config from '../config';
const App = db.get<IApp>('apps');
-App.createIndex('nameId');
-App.createIndex('nameIdLower');
App.createIndex('secret');
export default App;
@@ -16,17 +14,11 @@ export type IApp = {
userId: mongo.ObjectID | null;
secret: string;
name: string;
- nameId: string;
- nameIdLower: string;
description: string;
permission: string[];
callbackUrl: string;
};
-export function isValidNameId(nameId: string): boolean {
- return typeof nameId == 'string' && /^[a-zA-Z0-9_]{1,30}$/.test(nameId);
-}
-
/**
* Pack an app for API response
*
@@ -76,8 +68,6 @@ export const pack = (
_app.id = _app._id;
delete _app._id;
- delete _app.nameIdLower;
-
// Visible by only owner
if (!opts.includeSecret) {
delete _app.secret;