Skip to content

Commit d5e7394

Browse files
fix(endpoint-micropub): throw not implemented error if post path not configured
1 parent 52da779 commit d5e7394

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/endpoint-micropub/lib/post-data.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const postData = {
4141

4242
// Get post type configuration
4343
const typeConfig = postTypes[type];
44-
if (!typeConfig) {
44+
if (!typeConfig || !typeConfig.post?.path) {
4545
throw IndiekitError.notImplemented(type);
4646
}
4747

@@ -53,7 +53,7 @@ export const postData = {
5353
publication,
5454
);
5555
const url = await renderPath(
56-
typeConfig.post.url,
56+
typeConfig.post.url || typeConfig.post.path,
5757
properties,
5858
application,
5959
publication,

0 commit comments

Comments
 (0)