Skip to content

Commit

Permalink
chore(): debug thread
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshyx committed Dec 17, 2021
1 parent 14261c5 commit 3210c9e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions api/hub/src/datasources/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ class ProfileAPI extends DataSource {
const exists1 = profile.followers.indexOf(profile1.pubKey);

if (!profile || !profile1) {
logger.warn(`profile for ${pubKey} or ${ethAddress} was not found`);
await t.end();
return false;
}
Expand All @@ -228,7 +229,8 @@ class ProfileAPI extends DataSource {
if (exists1 === -1) {
profile.followers.unshift(profile1.pubKey);
}
await t.save([profile, profile1]);
await t.save([profile]);
await t.save([profile1]);
await t.end();
const followingKey = this.getCacheKey(`${this.FOLLOWING_KEY}${profile1.pubKey}`);
const followersKey = this.getCacheKey(`${this.FOLLOWERS_KEY}${profile.pubKey}`);
Expand Down Expand Up @@ -260,6 +262,7 @@ class ProfileAPI extends DataSource {
const exists = profile1.following.indexOf(profile.pubKey);
const exists1 = profile.followers.indexOf(profile1.pubKey);
if (!profile || !profile1) {
logger.warn(`profile for ${pubKey} or ${ethAddress} was not found`);
await t.end();
return false;
}
Expand All @@ -271,7 +274,8 @@ class ProfileAPI extends DataSource {
profile.followers.splice(exists1, 1);
}

await t.save([profile, profile1]);
await t.save([profile]);
await t.save([profile1]);
await t.end();

const followingKey = this.getCacheKey(`${this.FOLLOWING_KEY}${profile1.pubKey}`);
Expand Down
2 changes: 1 addition & 1 deletion ui/app-loader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ export default class AppLoader {
}
await this.sdk.services.appSettings.uninstall(info.name);
if (info.type === 'app') {
this.apps.uninstall(info);
await this.apps.uninstall(info);
}
if (info.type === 'widget') {
this.widgets.uninstall(info);
Expand Down
2 changes: 1 addition & 1 deletion ui/app-loader/src/widgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class Widgets extends BaseIntegration {
return;
}
this.widgetConfigs[widgetInfo.name] = widgetConfig;
this.registerWidget(widgetConfig.name);
await this.registerWidget(widgetConfig.name);
} else {
this.logger.warn(`App ${widgetInfo.name} has no exported .register() function!`);
}
Expand Down
2 changes: 1 addition & 1 deletion ui/typings/src/app-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export enum MenuItemType {
}

export enum MenuItemAreaType {
AppArea = 'app-area', // body of sideabr
AppArea = 'app-area', // body of sidebar
QuickAccessArea = 'quick-access-area', // right of topbar
BottomArea = 'bottom-area', // footer of sidebar
SearchArea = 'search-area', // middle of topbar
Expand Down

0 comments on commit 3210c9e

Please sign in to comment.