Add bookmarks via micropub
This commit is contained in:
parent
f16034d963
commit
a5d3ba7829
2 changed files with 61 additions and 0 deletions
|
@ -82,6 +82,14 @@ class MicropubController extends Controller
|
|||
'location' => config('app.url') . "/likes/$like->id",
|
||||
], 201)->header('Location', config('app.url') . "/likes/$like->id");
|
||||
}
|
||||
if ($request->has('properties.bookmark-of') || $request->has('bookmark-of')) {
|
||||
$bookmark = (new BookmarkService())->createBookmark($request);
|
||||
|
||||
return response()->json([
|
||||
'response' => 'created',
|
||||
'location' => config('app.url') . "/bookmarks/$bookmark->id",
|
||||
], 201)->header('Location', config('app.url') . "/bookmarks/$bookmark->id");
|
||||
}
|
||||
$data = [];
|
||||
$data['client-id'] = $tokenData->getClaim('client_id');
|
||||
if ($request->header('Content-Type') == 'application/json') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue