mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +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
17de5a91ff
commit
1df79dda2b
@ -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