mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
deactivate bookcases
This commit is contained in:
@@ -28,12 +28,16 @@ class SyncOpenBooks extends Command
|
||||
{
|
||||
$response = Http::post('https://openbookcase.de/api/listarea/83.08995477111446/-200.56640625000003/-38.13455657705413/221.30859375000003');
|
||||
|
||||
$ids = collect($response->json()['cases'])->pluck('id');
|
||||
|
||||
foreach ($response->json()['cases'] as $case) {
|
||||
try {
|
||||
BookCase::updateOrCreate(
|
||||
[
|
||||
'id' => $case['id'],
|
||||
],
|
||||
[
|
||||
'id' => $case['id'],
|
||||
'title' => $case['title'],
|
||||
'latitude' => (float) $case['lat'],
|
||||
'longitude' => (float) $case['lon'],
|
||||
@@ -52,8 +56,15 @@ class SyncOpenBooks extends Command
|
||||
'created_by' => 1,
|
||||
]
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
||||
BookCase::query()
|
||||
->whereNotIn('id', $ids)
|
||||
->update(['deactivated' => true]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -766,5 +766,6 @@
|
||||
"Article already tweeted": "Artikel bereits getwittert",
|
||||
"Is this a news article?": "Dieser Artikel ist ein News-Artikel",
|
||||
"Are your sure?": "Bist du dir sicher?",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -763,5 +763,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -763,5 +763,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -764,5 +764,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -764,5 +764,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -764,5 +764,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -764,5 +764,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -764,5 +764,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -764,5 +764,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -726,5 +726,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
@@ -738,5 +738,6 @@
|
||||
"Article already tweeted": "",
|
||||
"Is this a news article?": "",
|
||||
"Are your sure?": "",
|
||||
"Nostr public key": ""
|
||||
"Nostr public key": "",
|
||||
"Amount": ""
|
||||
}
|
||||
Reference in New Issue
Block a user