| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function getToken(DedicatedServer $dedicatedServer) |
||
| 21 | { |
||
| 22 | $dedicatedServer->gdaemon_api_token = Str::Random(64); |
||
| 23 | $dedicatedServer->update(); |
||
| 24 | |||
| 25 | return response()->json([ |
||
| 26 | 'token' => $dedicatedServer->gdaemon_api_token, |
||
| 27 | 'timestamp' => Carbon::now()->timestamp, |
||
| 28 | ]); |
||
| 31 |