DEV: Add the missing app subdirectory (#9499)

* DEV: Add missing  directory to the Discourse ember app

* DEV: Resolve imports correctly
This commit is contained in:
Roman Rizzi
2020-04-23 10:07:54 -03:00
committed by GitHub
parent 8e28ccb2ea
commit 7a2e8d3ead
1160 changed files with 106 additions and 101 deletions
@@ -0,0 +1,32 @@
import { ajax } from "discourse/lib/ajax";
import RestModel from "discourse/models/rest";
const TopicTimer = RestModel.extend({});
TopicTimer.reopenClass({
updateStatus(
topicId,
time,
basedOnLastPost,
statusType,
categoryId,
duration
) {
let data = {
time,
status_type: statusType
};
if (basedOnLastPost) data.based_on_last_post = basedOnLastPost;
if (categoryId) data.category_id = categoryId;
if (duration) data.duration = duration;
return ajax({
url: `/t/${topicId}/timer`,
type: "POST",
data
});
}
});
export default TopicTimer;