wip
This commit is contained in:
parent
9bcd3cde46
commit
efb7c71d88
|
@ -1,3 +1,13 @@
|
||||||
|
import * as mongo from 'mongodb';
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('sw_subscriptions') as any; // fuck type definition
|
const SwSubscription = db.get<ISwSubscription>('swSubscriptions');
|
||||||
|
export default SwSubscription;
|
||||||
|
|
||||||
|
export interface ISwSubscription {
|
||||||
|
_id: mongo.ObjectID;
|
||||||
|
userId: mongo.ObjectID;
|
||||||
|
endpoint: string;
|
||||||
|
auth: string;
|
||||||
|
publickey: string;
|
||||||
|
}
|
||||||
|
|
|
@ -187,3 +187,10 @@ db.signin.update({}, {
|
||||||
user_id: 'userId',
|
user_id: 'userId',
|
||||||
}
|
}
|
||||||
}, false, true);
|
}, false, true);
|
||||||
|
|
||||||
|
db.sw_subscriptions.renameCollection('swSubscriptions');
|
||||||
|
db.swSubscriptions.update({}, {
|
||||||
|
$rename: {
|
||||||
|
user_id: 'userId',
|
||||||
|
}
|
||||||
|
}, false, true);
|
||||||
|
|
Loading…
Reference in New Issue