diff --git a/.changeset/hungry-icons-try.md b/.changeset/hungry-icons-try.md new file mode 100644 index 000000000000..971873093a55 --- /dev/null +++ b/.changeset/hungry-icons-try.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': major +--- + +Removes deprecated method `addOAuthApp`. Moving forward, use the endpoint `oauth-apps.create` instead. diff --git a/apps/meteor/app/oauth2-server-config/server/admin/methods/addOAuthApp.ts b/apps/meteor/app/oauth2-server-config/server/admin/methods/addOAuthApp.ts deleted file mode 100644 index 3f41b1b01bea..000000000000 --- a/apps/meteor/app/oauth2-server-config/server/admin/methods/addOAuthApp.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { IOAuthApps } from '@rocket.chat/core-typings'; -import type { ServerMethods } from '@rocket.chat/ddp-client'; -import type { OauthAppsAddParams } from '@rocket.chat/rest-typings'; -import { Meteor } from 'meteor/meteor'; - -import { methodDeprecationLogger } from '../../../../lib/server/lib/deprecationWarningLogger'; -import { addOAuthApp } from '../functions/addOAuthApp'; - -declare module '@rocket.chat/ddp-client' { - // eslint-disable-next-line @typescript-eslint/naming-convention - interface ServerMethods { - addOAuthApp(application: OauthAppsAddParams): IOAuthApps; - } -} - -Meteor.methods({ - async addOAuthApp(application) { - methodDeprecationLogger.warn( - 'addOAuthApp is deprecated and will be removed in future versions of Rocket.Chat. Use the REST endpoint /v1/oauth-apps.create instead.', - ); - - return addOAuthApp(application, this.userId ?? undefined); - }, -}); diff --git a/apps/meteor/app/oauth2-server-config/server/index.ts b/apps/meteor/app/oauth2-server-config/server/index.ts index 2dd48fe73a2c..be26bdb2facb 100644 --- a/apps/meteor/app/oauth2-server-config/server/index.ts +++ b/apps/meteor/app/oauth2-server-config/server/index.ts @@ -1,6 +1,5 @@ import './oauth/oauth2-server'; import './oauth/default-services'; import './admin/functions/addOAuthApp'; -import './admin/methods/addOAuthApp'; import './admin/methods/updateOAuthApp'; import './admin/methods/deleteOAuthApp';