mirror of
https://github.com/discourse/discourse.git
synced 2025-02-11 06:58:46 +08:00
15 lines
359 B
JavaScript
15 lines
359 B
JavaScript
export default Ember.Controller.extend({
|
|
showLoginButton: Em.computed.equal("model.path", "login"),
|
|
|
|
actions: {
|
|
markFaqRead() {
|
|
const currentUser = this.currentUser;
|
|
if (currentUser) {
|
|
Discourse.ajax("/users/read-faq", { method: "POST" }).then(() => {
|
|
currentUser.set('read_faq', true);
|
|
});
|
|
}
|
|
}
|
|
}
|
|
});
|