diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 126d82a..2beddf0 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -181,6 +181,14 @@ class Auth extends BaseController ->searchModel(['uid'=>$user->uid,'quota_type'=>2]) ->value('(surplus_quota - freeze_quota)'); + $data['wine_available'] = (float)app()->make(ExchangeQuotaRepository::class) + ->searchModel(['uid'=>$user->uid,'quota_type'=>3]) + ->value('(surplus_quota - freeze_quota)'); + + $data['oil_available'] = (float)app()->make(ExchangeQuotaRepository::class) + ->searchModel(['uid'=>$user->uid,'quota_type'=>4]) + ->value('(surplus_quota - freeze_quota)'); + return app('json')->success($data); }