Skip to content

Commit 3f41ef4

Browse files
committed
fix(decorators) :Removed unnecessary line and reassigned groupSettings variable in initGroupSetting function
1 parent 999b563 commit 3f41ef4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/decorators/db/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ export function initGroupSetting() {
1111
descriptor.value = async function (...args: any[]) {
1212
const ctx: Context = (this as any)?.ctx || args[0];
1313
const groupSettingsRepo = new GroupSettingsService();
14-
const groupSettings = await groupSettingsRepo.getByGroupId(ctx.chat?.id!);
14+
let groupSettings = await groupSettingsRepo.getByGroupId(ctx.chat?.id!);
1515
if (!groupSettings) {
16-
await groupSettingsRepo.init(ctx);
16+
groupSettings = await groupSettingsRepo.init(ctx);
1717
}
18-
1918
return originalMethod.apply(this, args);
2019
};
2120

0 commit comments

Comments
 (0)