File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 159159 ],
160160
161161 'info ' => [
162- 'version ' => '2.3.3 ' ,
162+ 'version ' => '2.3.4 ' ,
163163 'homepage ' => 'https://github.com/scottboms/kirby-applemusic ' ,
164164 'license ' => 'MIT ' ,
165165 'authors ' => [[ 'name ' => 'Scott Boms ' ]],
Original file line number Diff line number Diff line change 4141 }
4242 ],
4343
44+
4445 /**
4546 * ---------------------------------------------------------------------------
4647 * has dev token?
5354 ],
5455
5556
57+ /**
58+ * ---------------------------------------------------------------------------
59+ * has mut token?
60+ */
61+ [
62+ 'pattern ' => 'applemusic/token-status ' ,
63+ 'method ' => 'GET ' ,
64+ 'action ' => function () {
65+ if (!$ user = kirby ()->user ()) {
66+ return Response::json (['ok ' => false , 'reason ' => 'unauthorized ' ], 401 );
67+ }
68+ $ token = Auth::readToken ($ user ->id ());
69+ return Response::json ([
70+ 'ok ' => (bool ) $ token ,
71+ 'hasToken ' => (bool ) $ token ,
72+ 'cacheKey ' => MusicKit::cacheKey ('token: ' . $ user ->id ()),
73+ 'path ' => Auth::tokenPath ($ user ->id ())
74+ ], 200 );
75+ }
76+ ],
77+
78+
5679 /**
5780 * ---------------------------------------------------------------------------
5881 * returns a dev token with cors + cache via Auth::devToken
Original file line number Diff line number Diff line change 22 "name" : " scottboms/applemusic" ,
33 "description" : " Apple Music Embed" ,
44 "author" :
" Scott Boms <[email protected] >" ,
5- "version" : " 2.3.3 " ,
5+ "version" : " 2.3.4 " ,
66 "type" : " kirby-plugin" ,
77 "license" : " MIT" ,
88 "scripts" : {
You can’t perform that action at this time.
0 commit comments