Browse Source

Parsing fix.

pull/363/head
Sebastian Stehle 7 years ago
parent
commit
08a25ec29f
  1. 4
      src/Squidex/app/framework/utils/date-time.ts
  2. 3
      src/Squidex/app/shared/services/rules.service.ts

4
src/Squidex/app/framework/utils/date-time.ts

@ -110,7 +110,7 @@ export class DateTime {
if (parsedMoment.isValid()) { if (parsedMoment.isValid()) {
return new DateTime(parsedMoment.toDate()); return new DateTime(parsedMoment.toDate());
} else { } else {
throw `${value} is not a valid date time string`; throw Error(`DateTime: ${value} is not a valid date time string`);
} }
} }
@ -120,7 +120,7 @@ export class DateTime {
if (parsedMoment.isValid()) { if (parsedMoment.isValid()) {
return new DateTime(parsedMoment.toDate()); return new DateTime(parsedMoment.toDate());
} else { } else {
throw `${value} is not a valid date time string`; throw Error(`DateTime: ${value} is not a valid date time string`);
} }
} }

3
src/Squidex/app/shared/services/rules.service.ts

@ -269,9 +269,6 @@ export class RulesService {
const url = this.apiUrl.buildUrl(link.href); const url = this.apiUrl.buildUrl(link.href);
return HTTP.requestVersioned(this.http, link.method, url, version).pipe( return HTTP.requestVersioned(this.http, link.method, url, version).pipe(
map(({ payload }) => {
return parseRule(payload.body);
}),
tap(() => { tap(() => {
this.analytics.trackEvent('Rule', 'Deleted', appName); this.analytics.trackEvent('Rule', 'Deleted', appName);
}), }),

Loading…
Cancel
Save