mirror of
https://github.com/discourse/discourse.git
synced 2024-12-23 09:43:43 +08:00
2ef9d6ac47
Sometimes changes to "What's new?" feed items are made or the feed items are removed altogether, and the polling interval to check for new features is 1 day. This is quite long, so this commit introduces a "Check for updates" button for admins to click on the "What's new?" page which will bust the cache for the feed and check again at the new features endpoint. This is limited to 5 times per minute to avoid rapid sending of requests.
15 lines
363 B
JavaScript
15 lines
363 B
JavaScript
import Controller from "@ember/controller";
|
|
import { action } from "@ember/object";
|
|
|
|
export default class AdminWhatsNewController extends Controller {
|
|
@action
|
|
checkForUpdates() {
|
|
this.checkFeaturesCallback?.({ forceRefresh: true });
|
|
}
|
|
|
|
@action
|
|
bindCheckFeatures(checkFeaturesCallback) {
|
|
this.checkFeaturesCallback = checkFeaturesCallback;
|
|
}
|
|
}
|