blob: 4fbdd646bb98d4e51f96461b9e7f0748c14fc0e1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB;
class PublicKeyController extends Controller
{
public function getUsersKey($user_id)
{
$public_key = DB::table('public_keys')
->where('user_id', $user_id)
->value('key');
// TODO: Friends: do not allow to request every public key
return $public_key ? $public_key : abort(404);
}
}
|