mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 09:03:12 +03:00
🐛 Fixed saving of custom integrations
closes https://github.com/TryGhost/Ghost/pull/14183
refs 3ee0c3ff53
- unskipped test for integration saving
- fixed missed rename from `save` to `saveTask`
- fixed `saveTask` throwing from a "handled" validation error
This commit is contained in:
parent
26388774cc
commit
d1e7ccbe00
@ -186,7 +186,16 @@ export default class IntegrationController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@task(function* () {
|
@task(function* () {
|
||||||
return yield this.integration.save();
|
try {
|
||||||
|
return yield this.integration.save();
|
||||||
|
} catch (e) {
|
||||||
|
if (e === undefined) {
|
||||||
|
// validation error
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
saveTask;
|
saveTask;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{{this.integration.name}}
|
{{this.integration.name}}
|
||||||
</h2>
|
</h2>
|
||||||
<section class="view-actions">
|
<section class="view-actions">
|
||||||
<GhTaskButton @task={{this.save}} @class="gh-btn gh-btn-primary gh-btn-icon" data-test-button="save" />
|
<GhTaskButton @task={{this.saveTask}} @class="gh-btn gh-btn-primary gh-btn-icon" data-test-button="save" />
|
||||||
</section>
|
</section>
|
||||||
</GhCanvasHeader>
|
</GhCanvasHeader>
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ describe('Acceptance: Settings - Integrations - Custom', function () {
|
|||||||
).to.equal('/settings/integrations/1');
|
).to.equal('/settings/integrations/1');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('can manage an integration', async function () {
|
it('can manage an integration', async function () {
|
||||||
this.server.create('integration');
|
this.server.create('integration');
|
||||||
|
|
||||||
await visit('/settings/integrations/1');
|
await visit('/settings/integrations/1');
|
||||||
|
Loading…
Reference in New Issue
Block a user