chore: Deprecate collection.url on client
This commit is contained in:
@@ -65,6 +65,9 @@ export default class Collection extends ParanoidModel {
|
||||
@observable
|
||||
documents?: NavigationNode[];
|
||||
|
||||
/**
|
||||
* @deprecated Use path instead.
|
||||
*/
|
||||
@observable
|
||||
url: string;
|
||||
|
||||
@@ -139,6 +142,11 @@ export default class Collection extends ParanoidModel {
|
||||
return (this.name ? this.name[0] : "?").toUpperCase();
|
||||
}
|
||||
|
||||
@computed
|
||||
get path() {
|
||||
return this.url;
|
||||
}
|
||||
|
||||
fetchDocuments = async (options?: { force: boolean }) => {
|
||||
if (this.isFetching) {
|
||||
return;
|
||||
|
||||
@@ -166,7 +166,7 @@ class Notification extends Model {
|
||||
const collection = this.collectionId
|
||||
? this.store.rootStore.collections.get(this.collectionId)
|
||||
: undefined;
|
||||
return collection ? collectionPath(collection.url) : "";
|
||||
return collection ? collectionPath(collection.path) : "";
|
||||
}
|
||||
case NotificationEventType.AddUserToDocument:
|
||||
case NotificationEventType.MentionedInDocument: {
|
||||
|
||||
Reference in New Issue
Block a user