Skip to content

Commit 5d9a4e2

Browse files
committed
decorator fixes for ember-update
1 parent 7ae5a64 commit 5d9a4e2

File tree

29 files changed

+809
-1795
lines changed

29 files changed

+809
-1795
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.9.1
1+
10

app/pods/components/all-courses/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ export default class AllCoursesComponent extends Component {
5252
* Fetch courses on the 'All Courses' page
5353
*/
5454

55-
@restartableTask
56-
*fetchAllCourses () {
55+
@restartableTask fetchAllCourses = function* () {
5756
const organization = this.get('currentUser.organization') || this.org
5857
const extraWhere = {}
5958

app/pods/components/carousel-cards/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ export default class CarouselCards extends Component {
5555
this.get('getCarouselCardsTask').perform()
5656
}
5757

58-
@restartableTask
59-
*getCarouselCardsTask () {
58+
@restartableTask getCarouselCardsTask = function *() {
6059
const cards = yield this.get('store').query('carousel_card', {
6160
sort: 'order'
6261
})

app/pods/components/cart-dialog/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ export default class CartDialog extends Component {
88

99
dukaanUrl = env.dukaanUrl
1010

11-
@restartableTask
12-
*addCartTask() {
11+
@restartableTask addCartTask = function * () {
1312
yield this.get('api').request('/runs/clear_cart');
1413
const runId = this.get('run.id');
1514
yield this.get('api').request(`/runs/${runId}/buy`);

app/pods/components/code-editor/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ export default class EditorClass extends Component {
133133
this.sendAction('toggleModal', modalContentType);
134134
}
135135

136-
@restartableTask
137-
*setCollabModeTask (value) {
136+
@restartableTask setCollabModeTask = function *(value) {
138137
if (value) {
139138
yield this.firepad.connect()
140139
} else {

app/pods/components/course-search-box/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export default class SearchBoxComponent extends Component {
1616

1717
@alias('searchTask.lastSuccessful.value') results
1818

19-
@restartableTask
20-
*searchTask () {
19+
@restartableTask searchTask = function* () {
2120
yield timeout (100)
2221
const searchQuery = this.get('qs').trim().toLowerCase()
2322

app/pods/components/csv-submission-success/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ export default class extends Component{
1212
this.pollingTask.perform()
1313
}
1414

15-
@restartableTask
16-
*pollingTask() {
15+
@restartableTask pollingTask = function *() {
1716
while (this.maxTries--) {
1817
yield timeout(this.gap)
1918
const result = yield this.submission.reload()

app/pods/components/discourse-topics-view/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ export default class DiscourseTopicsView extends Component {
2323
return `${env.discussBaseUrl}/c/${categoryId}/${subCategoryId}`
2424
}
2525

26-
@restartableTask
27-
*fetchTopicTasks () {
26+
@restartableTask fetchTopicTasks = function* () {
2827
const courseId = this.get('course.id')
2928
return yield this.get('api').request(`/courses/${courseId}/doubts`, {
3029
data: {

app/pods/components/doubt-feedback/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { inject as service } from '@ember/service';
55
export default class DoubtFeedbackComponent extends Component {
66
@service store
77

8-
@restartableTask
9-
*submitFeedback() {
8+
@restartableTask submitFeedback = function *() {
109
let df = this.store.createRecord('doubt-feedback', {
1110
type: 'STUDENT',
1211
score: this.score,

app/pods/components/doubt-view-attempt/component.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ export default class DoubtViewAttemptComponent extends Component{
2929
return false
3030
}
3131

32-
@restartableTask
33-
*commentTask () {
32+
@restartableTask commentTask = function* () {
3433
if (this.get('commentBody.length') < 20) {
3534
return this.set('err', 'Comment length must be atleast 20 characters.')
3635
}

0 commit comments

Comments
 (0)