mirror of
https://github.com/discourse/discourse.git
synced 2025-05-02 18:04:42 +08:00
DEV: Remove deprecation for Discourse.Session
This commit is contained in:
parent
8311374a5a
commit
4c17ff98fa
@ -1,6 +1,5 @@
|
|||||||
import RestModel from "discourse/models/rest";
|
import RestModel from "discourse/models/rest";
|
||||||
import Singleton from "discourse/mixins/singleton";
|
import Singleton from "discourse/mixins/singleton";
|
||||||
import deprecated from "discourse-common/lib/deprecated";
|
|
||||||
|
|
||||||
// A data model representing current session data. You can put transient
|
// A data model representing current session data. You can put transient
|
||||||
// data here you might want later. It is not stored or serialized anywhere.
|
// data here you might want later. It is not stored or serialized anywhere.
|
||||||
@ -12,13 +11,4 @@ const Session = RestModel.extend({
|
|||||||
|
|
||||||
Session.reopenClass(Singleton);
|
Session.reopenClass(Singleton);
|
||||||
|
|
||||||
Object.defineProperty(Discourse, "Session", {
|
|
||||||
get() {
|
|
||||||
deprecated("Import the Session object instead of using Discourse.Session", {
|
|
||||||
since: "2.4.0",
|
|
||||||
dropFrom: "2.5.0"
|
|
||||||
});
|
|
||||||
return Session;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
export default Session;
|
export default Session;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user