diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-08-19 18:38:02 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-08-19 18:38:02 +0900 |
| commit | bb7b335491e97a071efa4dc119cee8c9fcc9dd88 (patch) | |
| tree | 57b7ee3c74621cb43fad5ca9a7da420930b263fc /src/models | |
| parent | 7.0.2 (diff) | |
| download | sharkey-bb7b335491e97a071efa4dc119cee8c9fcc9dd88.tar.gz sharkey-bb7b335491e97a071efa4dc119cee8c9fcc9dd88.tar.bz2 sharkey-bb7b335491e97a071efa4dc119cee8c9fcc9dd88.zip | |
nameId廃止 & アプリ作成時にシークレットを返すように
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/app.ts | 10 |
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; |