fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
3 changed files with 11 additions and 3 deletions
Showing only changes of commit 82a9ba983e - Show all commits

5
.hintrc Normal file
View file

@ -0,0 +1,5 @@
{
"extends": [
"development"
]
}

View file

@ -271,10 +271,14 @@ export class SecService extends GBService {
*/
public async setParam (userId: number, name: string, value:any) {
const options = { where: {} };
options.where = { botId: userId };
options.where = { userId: userId };
let user = await GuaribasUser.findOne(options);
// tslint:disable-next-line:prefer-object-spread
let obj = JSON.parse(user.params);
if (!obj)
{
obj = {};
}
obj['name'] = value;
user.params = JSON.stringify(obj);
return await user.save();

View file

@ -1,6 +1,5 @@
{
"compilerOptions
": {
"compilerOptions": {
"allowJs": true,
"downlevelIteration": true,
"baseUrl": "./",