Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Apply prettier
Dieser Commit ist enthalten in:
Ursprung
56f58414b3
Commit
dfd382cd8a
1 geänderte Dateien mit 3 neuen und 9 gelöschten Zeilen
|
@ -1,11 +1,7 @@
|
||||||
import CustomWizard from "../models/custom-wizard";
|
import CustomWizard from "../models/custom-wizard";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
|
||||||
const excludedMetaFields = [
|
const excludedMetaFields = ["route_to", "redirect_on_complete", "redirect_to"];
|
||||||
'route_to',
|
|
||||||
'redirect_on_complete',
|
|
||||||
'redirect_to'
|
|
||||||
];
|
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
model(params) {
|
model(params) {
|
||||||
|
@ -14,9 +10,7 @@ export default DiscourseRoute.extend({
|
||||||
|
|
||||||
setupController(controller, model) {
|
setupController(controller, model) {
|
||||||
if (model && model.submissions) {
|
if (model && model.submissions) {
|
||||||
let fields = [
|
let fields = ["username"];
|
||||||
'username'
|
|
||||||
];
|
|
||||||
model.submissions.forEach((s) => {
|
model.submissions.forEach((s) => {
|
||||||
Object.keys(s.fields).forEach((k) => {
|
Object.keys(s.fields).forEach((k) => {
|
||||||
if (!excludedMetaFields.includes(k) && fields.indexOf(k) < 0) {
|
if (!excludedMetaFields.includes(k) && fields.indexOf(k) < 0) {
|
||||||
|
@ -28,7 +22,7 @@ export default DiscourseRoute.extend({
|
||||||
let submissions = [];
|
let submissions = [];
|
||||||
model.submissions.forEach((s) => {
|
model.submissions.forEach((s) => {
|
||||||
let submission = {
|
let submission = {
|
||||||
username: s.username
|
username: s.username,
|
||||||
};
|
};
|
||||||
Object.keys(s.fields).forEach((f) => {
|
Object.keys(s.fields).forEach((f) => {
|
||||||
if (fields.includes(f)) {
|
if (fields.includes(f)) {
|
||||||
|
|
Laden …
In neuem Issue referenzieren