|
@@ -99,8 +99,9 @@ |
|
|
block discarded – undo |
|
99
|
99
|
{ |
|
100
|
100
|
$voucher = DB::table('vouchers')->where('code', $request->json()->get('voucherCode'))->first(); |
|
101
|
101
|
|
|
102
|
|
- if ($voucher == null) |
|
103
|
|
- return response()->json('', 404); |
|
|
102
|
+ if ($voucher == null) { |
|
|
103
|
+ return response()->json('', 404); |
|
|
104
|
+ } |
|
104
|
105
|
|
|
105
|
106
|
DB::table('users')->where('id', $request->user()->uniqueId)->increment('credits', $voucher->credits); |
|
106
|
107
|
DB::table('users')->where('id', $request->user()->uniqueId)->increment('pixels', $voucher->points); |
Please login to merge, or discard this patch.