Skip to content

Commit

Permalink
Fixed migration file bug (#4465)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakumizuki committed Oct 8, 2021
1 parent 9650d68 commit 83dcf12
Showing 1 changed file with 12 additions and 4 deletions.
Expand Up @@ -20,8 +20,12 @@ module.exports = {

const commandPermission = JSON.parse(commandPermissionValue._doc.value);

const newCommandPermission = {};
Object.entries(commandPermission).forEach((key, value) => {
const newCommandPermission = {
note: false,
keep: false,
};
Object.entries(commandPermission).forEach((entry) => {
const [key, value] = entry;
switch (key) {
case 'create':
newCommandPermission.note = value;
Expand Down Expand Up @@ -59,8 +63,12 @@ module.exports = {

const commandPermission = JSON.parse(commandPermissionValue._doc.value);

const newCommandPermission = {};
Object.entries(commandPermission).forEach((key, value) => {
const newCommandPermission = {
create: false,
togetter: false,
};
Object.entries(commandPermission).forEach((entry) => {
const [key, value] = entry;
switch (key) {
case 'note':
newCommandPermission.create = value;
Expand Down

0 comments on commit 83dcf12

Please sign in to comment.