Add Article::uri accessor for the absolute post URL
Follow the uri/link convention already used by Note, Bookmark, and
Place, rather than concatenating config('app.url') inline where the
absolute URL is needed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017USyUg8PwuoDcHP8pv5xjy
This commit is contained in:
parent
77998a963e
commit
4aa93d63bb
3 changed files with 19 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ class EntryHandler implements MicropubHandlerInterface
|
|||
$location = match (true) {
|
||||
isset($dataArray['like-of']) => resolve(LikeService::class)->create($dataArray)->url,
|
||||
isset($dataArray['bookmark-of']) => resolve(BookmarkService::class)->create($dataArray)->uri,
|
||||
isset($dataArray['name']) => config('app.url').resolve(ArticleService::class)->create($dataArray)->link,
|
||||
isset($dataArray['name']) => resolve(ArticleService::class)->create($dataArray)->uri,
|
||||
default => resolve(NoteService::class)->create($dataArray)->uri,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue