Remove old translations and code not in use anymore.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2025-11-05 19:03:21 +02:00
parent 71b7dcffb5
commit ba49d4d140
3 changed files with 2 additions and 73 deletions

View file

@ -59,7 +59,7 @@ class DeleteDuplicateEmptyListsMigration {
return false;
} catch (error) {
console.error('Error checking if deleteEmptyLists migration is needed:', error);
console.error('Error checking if deleteDuplicateEmptyLists migration is needed:', error);
return false;
}
}
@ -92,7 +92,7 @@ class DeleteDuplicateEmptyListsMigration {
results
};
} catch (error) {
console.error('Error executing deleteEmptyLists migration:', error);
console.error('Error executing deleteDuplicateEmptyLists migration:', error);
return {
success: false,
error: error.message
@ -319,16 +319,6 @@ const deleteDuplicateEmptyListsMigration = new DeleteDuplicateEmptyListsMigratio
// Register Meteor methods
Meteor.methods({
'deleteEmptyLists.needsMigration'(boardId) {
check(boardId, String);
if (!this.userId) {
throw new Meteor.Error('not-authorized', 'You must be logged in');
}
return deleteDuplicateEmptyListsMigration.needsMigration(boardId);
},
'deleteDuplicateEmptyLists.needsMigration'(boardId) {
check(boardId, String);
@ -339,36 +329,6 @@ Meteor.methods({
return deleteDuplicateEmptyListsMigration.needsMigration(boardId);
},
'deleteEmptyLists.execute'(boardId) {
check(boardId, String);
if (!this.userId) {
throw new Meteor.Error('not-authorized', 'You must be logged in');
}
// Check if user is board admin
const board = ReactiveCache.getBoard(boardId);
if (!board) {
throw new Meteor.Error('board-not-found', 'Board not found');
}
const user = ReactiveCache.getUser(this.userId);
if (!user) {
throw new Meteor.Error('user-not-found', 'User not found');
}
// Only board admins can run migrations
const isBoardAdmin = board.members && board.members.some(
member => member.userId === this.userId && member.isAdmin
);
if (!isBoardAdmin && !user.isAdmin) {
throw new Meteor.Error('not-authorized', 'Only board administrators can run migrations');
}
return deleteDuplicateEmptyListsMigration.executeMigration(boardId);
},
'deleteDuplicateEmptyLists.execute'(boardId) {
check(boardId, String);
@ -399,16 +359,6 @@ Meteor.methods({
return deleteDuplicateEmptyListsMigration.executeMigration(boardId);
},
'deleteEmptyLists.getStatus'(boardId) {
check(boardId, String);
if (!this.userId) {
throw new Meteor.Error('not-authorized', 'You must be logged in');
}
return deleteDuplicateEmptyListsMigration.getStatus(boardId);
},
'deleteDuplicateEmptyLists.getStatus'(boardId) {
check(boardId, String);