@rmdes/indiekit-endpoint-microsub 1.0.0-beta.8 → 1.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -117,6 +117,8 @@ export default class MicrosubEndpoint {
|
|
|
117
117
|
* @param {object} indiekit - Indiekit instance
|
|
118
118
|
*/
|
|
119
119
|
init(indiekit) {
|
|
120
|
+
console.info("[Microsub] Initializing endpoint-microsub plugin");
|
|
121
|
+
|
|
120
122
|
// Register MongoDB collections
|
|
121
123
|
indiekit.addCollection("microsub_channels");
|
|
122
124
|
indiekit.addCollection("microsub_feeds");
|
|
@@ -125,6 +127,8 @@ export default class MicrosubEndpoint {
|
|
|
125
127
|
indiekit.addCollection("microsub_muted");
|
|
126
128
|
indiekit.addCollection("microsub_blocked");
|
|
127
129
|
|
|
130
|
+
console.info("[Microsub] Registered MongoDB collections");
|
|
131
|
+
|
|
128
132
|
// Register endpoint
|
|
129
133
|
indiekit.addEndpoint(this);
|
|
130
134
|
|
|
@@ -136,7 +140,12 @@ export default class MicrosubEndpoint {
|
|
|
136
140
|
// Start feed polling scheduler when server starts
|
|
137
141
|
// This will be called after the server is ready
|
|
138
142
|
if (indiekit.database) {
|
|
143
|
+
console.info("[Microsub] Database available, starting scheduler");
|
|
139
144
|
startScheduler(indiekit);
|
|
145
|
+
} else {
|
|
146
|
+
console.warn(
|
|
147
|
+
"[Microsub] Database not available at init, scheduler not started",
|
|
148
|
+
);
|
|
140
149
|
}
|
|
141
150
|
}
|
|
142
151
|
|
package/package.json
CHANGED