From 44584fb882570135ff1402264dec07ca6ab89e24 Mon Sep 17 00:00:00 2001 From: FoskyM Date: Sun, 1 Oct 2023 17:34:20 +0800 Subject: [PATCH] feat: get client info --- js/dist/forum.js | Bin 3312 -> 3508 bytes js/dist/forum.js.map | Bin 11744 -> 12157 bytes .../forum/components/oauth/AuthorizePage.js | 5 ++++- src/Api/Controller/ShowClientController.php | 4 ++-- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/js/dist/forum.js b/js/dist/forum.js index 83ca55c8a94579841b3ea060fc329507292cae13..d05dddc97aa353659689b2ccdfe406a5d0688eae 100644 GIT binary patch delta 299 zcmew$xkY*dBQsaBZHZo11x^`HabvS2Jq?$!pBIK$3+;8%P?kr~t`O76l+# z#-au!=dys*oB)%b!K56kK2XGu)rhflb0h0N#>uM8)sh8?MTxn^w$ZUVsd~vdnW=dt zwt1yFIXbD6Z*qoB{>h$NZ)=+mm5I+xsi^_Uf`p1viwpAeic{lDDhpDPg;O$%Qj<&K zON%n?bM=byOG{Gqic?E8l=PJ}tu#t9GK=+~cINAVc~DymG&J>!OY)0S_0m&IoGLYx i@)Ju-GIWy_z>X?b(oupa1Uf=V2gya6n^$tUvj6~&RAwar delta 192 zcmdlY{XudABQsa2ZHZopCSrmX|8H*Z_oXY}Ia{^3$29t8E`alssRwKsb&5f-87$;Y9RZY(1NcC2<&DTrL z$xO{FiO) diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 28515cdbed928f8985ea5157785db9997ba36935..1b1cfe442bb0da51f83b9d63afbbe935f2b696e9 100644 GIT binary patch delta 1134 zcmZuwOKuZE5LJYP^Fc&Hir4@eETkm3V-kggSWy<$J%gD{91|SJvCSuAdty5{wy`H) z33b{^|$HR^&J2RrT%)& zA2@9(vheg+ZVLyaCz3x)N_co$lp=$lx(Q+(z#*@joW`VTs16Z8PNV^xbE;JP7f}c~ z+)F7G;&8zx&zXJI@F|3pslSW)G-oz>T~;Cwk7WsYS7b4vh_j-&vB&{r38=QVxORnV zAyc<0ok_87BR-+O#I|C)RF%u?U$NVR6792xq5!a}=w|0K;E*o@yroT{Q(56qN%)|8 zPM@VZT%AdiQWvY761VW!j2s|9)dI4_tFad@UkQjWU!XN3>Jp03l%fdWH<*-#IHwM^ zQ-mvpg`r6A`T4rKJAN@D1!2Xs$uQepi-))Kabzte=E&U2#hL}vq#K8g1iEm zlow5jM($q;SHbPEBy~C(R!Sy#pF7hxCz4~AdSl|wpl>sl{6}IMTgW(gXFgpA`{Wxm zs=c~0gF8}JCWkMEl=Z0k|D)pxR|;%to;=ANB4h)iL6~u%mnvm+(^ZvyCI!80wvQb! zMn@LtnaTLPD?H_`D3nd=0f&r3c|iwPtVw`1N$4YcM;}Zk#ve(%X}XfdgLP{W&D-YJ zR@g>>gW>O!<+&ra-P>iY{D)CXHv5!mDXdeQ^pc>XpG`d(??%P?!&G9dIvh@Ynz`5Y zd;W3X+OW#6)?cZv- zZtpMf?!lyY<1g?x_&o|2`uS~_PL2YMEa)j6d>W3SYMIxhdd5(RoXFq z5hczDv2WK(^|4^55)HDd7}YxD=}-$ua-!8H>5}$a{aW-Tq3Qzc1pMSguQFLO)T#qG zGKVs823O-1LJA>mO;gyWXo3z)1vTCTG)>u3#AhweTU%!pqU~m)N*x4%kLWQU1c(Rr z7!HY(L0KpUeJz`jS~PSIG#lImK24PJAsVW$NkM*SF5jKjI}na?C_+SjgmPcb(?eTy zy!x>m;6JVn0--wRS`G&Xf(pBa_!~X;;n@!Q_JecXALOllZvE>~Zjo5oCJ3@ELOxmg z(*AI6+-l0cZ!~#DQvdGz>fFBein~yV?0t7`?g?KlR8 { + this.client = client; + }); } } diff --git a/src/Api/Controller/ShowClientController.php b/src/Api/Controller/ShowClientController.php index 39adda5..3b88c8d 100644 --- a/src/Api/Controller/ShowClientController.php +++ b/src/Api/Controller/ShowClientController.php @@ -15,10 +15,10 @@ class ShowClientController extends AbstractListController public $serializer = ClientSerializer::class; protected function data(ServerRequestInterface $request, Document $document) { - $id = Arr::get($request->getQueryParams(), 'id'); + $client_id = Arr::get($request->getQueryParams(), 'client_id'); RequestUtil::getActor($request)->assertUser(); - $client = Client::findOrFail($id); + $client = Client::whereOrFail('client_id', $client_id); $client->client_secret = ''; return $client;