mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
Fix bug
This commit is contained in:
parent
704e02906d
commit
7d750d23c2
@ -3,9 +3,13 @@ import * as mongo from 'mongodb';
|
||||
import Subscription from '../models/sw-subscription';
|
||||
import config from '../../conf';
|
||||
|
||||
push.setGCMAPIKey(config.sw.gcm_api_key);
|
||||
if (config.sw) {
|
||||
push.setGCMAPIKey(config.sw.gcm_api_key);
|
||||
}
|
||||
|
||||
export default async function(userId: mongo.ObjectID | string, type, body?) {
|
||||
if (!config.sw) return;
|
||||
|
||||
if (typeof userId === 'string') {
|
||||
userId = new mongo.ObjectID(userId);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user