mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Use method definition syntax consistently (#14915)
This commit is contained in:
@@ -5,7 +5,7 @@ import { ajax } from "discourse/lib/ajax";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
const Permalink = EmberObject.extend({
|
||||
save: function () {
|
||||
save() {
|
||||
return ajax("/admin/permalinks.json", {
|
||||
type: "POST",
|
||||
data: {
|
||||
@@ -17,16 +17,16 @@ const Permalink = EmberObject.extend({
|
||||
},
|
||||
|
||||
@discourseComputed("category_id")
|
||||
category: function (category_id) {
|
||||
category(category_id) {
|
||||
return Category.findById(category_id);
|
||||
},
|
||||
|
||||
@discourseComputed("external_url")
|
||||
linkIsExternal: function (external_url) {
|
||||
linkIsExternal(external_url) {
|
||||
return !DiscourseURL.isInternal(external_url);
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
destroy() {
|
||||
return ajax("/admin/permalinks/" + this.id + ".json", {
|
||||
type: "DELETE",
|
||||
});
|
||||
@@ -34,7 +34,7 @@ const Permalink = EmberObject.extend({
|
||||
});
|
||||
|
||||
Permalink.reopenClass({
|
||||
findAll: function (filter) {
|
||||
findAll(filter) {
|
||||
return ajax("/admin/permalinks.json", { data: { filter } }).then(function (
|
||||
permalinks
|
||||
) {
|
||||
|
Reference in New Issue
Block a user