DEV: Use a standard service injection (#23439)

A follow up to f73d8346c2
This commit is contained in:
Jarek Radosz 2023-09-06 17:10:08 +02:00 committed by GitHub
parent 0f6ac634f4
commit 60bc4efda4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -37,6 +37,7 @@ import { cancel } from "@ember/runloop";
import discourseLater from "discourse-common/lib/later";
import { isTesting } from "discourse-common/config/environment";
import { dependentKeyCompat } from "@ember/object/compat";
import { inject as service } from "@ember/service";
export const SECOND_FACTOR_METHODS = {
TOTP: 1,
@ -167,6 +168,8 @@ function userOption(userOptionKey) {
}
const User = RestModel.extend({
userTips: service(),
mailing_list_mode: userOption("mailing_list_mode"),
external_links_in_new_tab: userOption("external_links_in_new_tab"),
enable_quoting: userOption("enable_quoting"),
@ -1349,9 +1352,6 @@ User.reopenClass(Singleton, {
args = args || {};
this.deleteStatusTrackingFields(args);
const owner = getOwner(this);
args.userTips = owner.lookup("service:user-tips");
return this._super(args);
},