label: q.label,
disabled: q.disabled
}))
-
- console.log(
- this.videoQuotaOptions,
- this.videoQuotaDailyOptions
- )
}
}
async function getUserInformation (req: express.Request, res: express.Response) {
// We did not load channels in res.locals.user
- const user = await UserModel.loadForMeAPI(res.locals.oauth.token.user.username)
+ const user = await UserModel.loadForMeAPI(res.locals.oauth.token.user.id)
return res.json(user.toMeFormattedJSON())
}
static loadByUsername (username: string): Promise<MUserDefault> {
const query = {
where: {
- username: { [Op.iLike]: username }
+ username
}
}
return UserModel.findOne(query)
}
- static loadForMeAPI (username: string): Promise<MUserNotifSettingChannelDefault> {
+ static loadForMeAPI (id: number): Promise<MUserNotifSettingChannelDefault> {
const query = {
where: {
- username: { [Op.iLike]: username }
+ id
}
}