Skip to content

Commit

Permalink
fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Aug 16, 2024
1 parent e5c6788 commit 8c7752a
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/meteor/app/api/server/v1/channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Meteor } from 'meteor/meteor';

import { isTruthy } from '../../../../lib/isTruthy';
import { findUsersOfRoom } from '../../../../server/lib/findUsersOfRoom';
import { eraseRoom } from '../../../../server/methods/eraseRoom';
import { eraseRoom } from '../../../../server/lib/eraseRoom';

Check failure on line 27 in apps/meteor/app/api/server/v1/channels.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

`../../../../server/lib/eraseRoom` import should occur before import of `../../../../server/lib/findUsersOfRoom`
import { hideRoomMethod } from '../../../../server/methods/hideRoom';
import { removeUserFromRoomMethod } from '../../../../server/methods/removeUserFromRoom';
import { canAccessRoomAsync } from '../../../authorization/server';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/api/server/v1/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Meteor } from 'meteor/meteor';
import type { Filter } from 'mongodb';

import { findUsersOfRoom } from '../../../../server/lib/findUsersOfRoom';
import { eraseRoom } from '../../../../server/methods/eraseRoom';
import { eraseRoom } from '../../../../server/lib/eraseRoom';

Check failure on line 9 in apps/meteor/app/api/server/v1/groups.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

`../../../../server/lib/eraseRoom` import should occur before import of `../../../../server/lib/findUsersOfRoom`
import { hideRoomMethod } from '../../../../server/methods/hideRoom';
import { removeUserFromRoomMethod } from '../../../../server/methods/removeUserFromRoom';
import { canAccessRoomAsync, roomAccessAttributes } from '../../../authorization/server';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/api/server/v1/im.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Match, check } from 'meteor/check';
import { Meteor } from 'meteor/meteor';

import { createDirectMessage } from '../../../../server/methods/createDirectMessage';
import { eraseRoom } from '../../../../server/methods/eraseRoom';
import { eraseRoom } from '../../../../server/lib/eraseRoom';

Check failure on line 18 in apps/meteor/app/api/server/v1/im.ts

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

`../../../../server/lib/eraseRoom` import should occur before import of `../../../../server/methods/createDirectMessage`
import { hideRoomMethod } from '../../../../server/methods/hideRoom';
import { canAccessRoomIdAsync } from '../../../authorization/server/functions/canAccessRoom';
import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/api/server/v1/rooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Meteor } from 'meteor/meteor';
import { isTruthy } from '../../../../lib/isTruthy';
import { omit } from '../../../../lib/utils/omit';
import * as dataExport from '../../../../server/lib/dataExport';
import { eraseRoom } from '../../../../server/methods/eraseRoom';
import { eraseRoom } from '../../../../server/lib/eraseRoom';
import { muteUserInRoom } from '../../../../server/methods/muteUserInRoom';
import { unmuteUserInRoom } from '../../../../server/methods/unmuteUserInRoom';
import { canAccessRoomAsync, canAccessRoomIdAsync } from '../../../authorization/server/functions/canAccessRoom';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/api/server/v1/teams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { escapeRegExp } from '@rocket.chat/string-helpers';
import { Match, check } from 'meteor/check';

import { eraseRoom } from '../../../../server/methods/eraseRoom';
import { eraseRoom } from '../../../../server/lib/eraseRoom';
import { canAccessRoomAsync } from '../../../authorization/server';
import { hasPermissionAsync, hasAtLeastOnePermissionAsync } from '../../../authorization/server/functions/hasPermission';
import { removeUserFromRoom } from '../../../lib/server/functions/removeUserFromRoom';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { AppEvents, Apps } from '@rocket.chat/apps';
import { Message, Team } from '@rocket.chat/core-services';
import type { ServerMethods } from '@rocket.chat/ddp-client';
import { Rooms } from '@rocket.chat/models';
import { Meteor } from 'meteor/meteor';

import { hasPermissionAsync } from '../../app/authorization/server/functions/hasPermission';
import { deleteRoom } from '../../app/lib/server/functions/deleteRoom';
import { roomCoordinator } from '../lib/rooms/roomCoordinator';
import { roomCoordinator } from './rooms/roomCoordinator';

export async function eraseRoom(rid: string, uid: string): Promise<void> {
const room = await Rooms.findOneById(rid);
Expand Down
1 change: 0 additions & 1 deletion apps/meteor/server/methods/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import './channelsList';
import './createDirectMessage';
import './deleteFileMessage';
import './deleteUser';
import './eraseRoom';
import './getAvatarSuggestion';
import './getPasswordPolicy';
import './getRoomById';
Expand Down

0 comments on commit 8c7752a

Please sign in to comment.