Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(InMemoryProvider): saveGuild and saveAxon inconsistency. #53

Merged
merged 4 commits into from
Feb 15, 2020

Conversation

Aervyon
Copy link
Contributor

@Aervyon Aervyon commented Feb 15, 2020

PULL REQUEST

Overview

Fixed two functions of InnMemoryProvider, init (was not implemented) and saveGuildSchema.

Status

  • Typings have been updated or don't need to be.
  • This PR have been tested and is ready to be merged.

Semantic versioning classification

  • This PR introduces BREAKING changes.
  • This PR adds new features, improve the code and implies minimal changes.
  • This PR fixes a bug and references the relevant issue or documentation.
  • This PR improve performance or code refactor without API changes.
  • This PR only includes non-code changes (documentation, CI, tools...).

@Khaaz Khaaz added the bug fix label Feb 15, 2020
Copy link
Owner

@Khaaz Khaaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, this is indeed an inconsistency that could be misleading and cause potential breaking issue.

src/Database/InMemoryProvider.js Show resolved Hide resolved
src/Database/InMemoryProvider.js Outdated Show resolved Hide resolved
@Khaaz Khaaz changed the title Fix InMemoryProvider fix(InMemoryProvider): saveGuild and saveAxon inconsistency. Feb 15, 2020
Copy link
Owner

@Khaaz Khaaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally missed this as well.
This PR really fixed some major issue that would have been hard to debug

src/Database/InMemoryProvider.js Outdated Show resolved Hide resolved
src/Database/InMemoryProvider.js Outdated Show resolved Hide resolved
@Khaaz Khaaz merged commit 4f7fc78 into Khaaz:dev Feb 15, 2020
}

async updateGuild(key, gID, value) {
const guild = await this.fetchGuild(gID);
guild[key] = value;
this.saveGuildSchema(gID, guild);
return guild;
return this.saveGuildSchema(gID, guild);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.saveGuild instead of saveGuildSchema?

@@ -82,7 +85,7 @@ class InMemoryProvider extends ADBProvider {
axonConf = await this.initAxon();
}
axonConf[key] = value;
return axonConf;
return this.saveAxonSchema(axonConf);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.saveAxon instead of saveAxonSchema?

Khaaz added a commit that referenced this pull request Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants