-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added dummy delete post API endpoint (#354)
refs [AP-810](https://linear.app/ghost/issue/AP-810/unblock-frontend-work-with-a-mock-deleteid-http-api) Added a dummy delete post API endpoint that returns a 204 response for the purpose of enabling the frontend to simulate a delete post action. This logic to be implemented in this endpoint will be fleshed out at a later time
- Loading branch information
Showing
5 changed files
with
62 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: Delete a post | ||
|
||
Scenario: Correct response code is returned | ||
When an authenticated "delete" request is made to "/.ghost/activitypub/post/123" | ||
Then the request is accepted with a 204 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Create a handler for a request to delete a post | ||
*/ | ||
export function createDeletePostHandler() { | ||
/** | ||
* Handle a request to delete a post | ||
*/ | ||
return async function handleDeletePost() { | ||
return new Response(null, { | ||
status: 204, | ||
}); | ||
}; | ||
} |