mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Fix api url
This commit is contained in:
committed by
Constantin Graf
parent
ddf11b394d
commit
d9925d632e
@@ -453,8 +453,8 @@ class TimeEntryController extends Controller
|
||||
->whereIn('id', $ids)
|
||||
->get();
|
||||
|
||||
$success = new Collection();
|
||||
$error = new Collection();
|
||||
$success = new Collection;
|
||||
$error = new Collection;
|
||||
|
||||
foreach ($ids as $id) {
|
||||
/** @var TimeEntry|null $timeEntry */
|
||||
|
||||
@@ -18,7 +18,7 @@ use Log;
|
||||
|
||||
class ApiService
|
||||
{
|
||||
private const string API_URL = 'https://app.solidtime.io/api';
|
||||
private const string API_URL = 'https://app.solidtime.io/api/v1';
|
||||
|
||||
public function checkForUpdate(): ?string
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class ApiService
|
||||
$response = Http::asJson()
|
||||
->timeout(3)
|
||||
->connectTimeout(2)
|
||||
->post(self::API_URL.'/check-for-update', [
|
||||
->post(self::API_URL.'/ping/version', [
|
||||
'version' => config('app.version'),
|
||||
'build' => config('app.build'),
|
||||
'url' => config('app.url'),
|
||||
@@ -57,7 +57,7 @@ class ApiService
|
||||
$response = Http::asJson()
|
||||
->timeout(3)
|
||||
->connectTimeout(2)
|
||||
->post(self::API_URL.'/telemetry', [
|
||||
->post(self::API_URL.'/ping/telemetry', [
|
||||
'version' => config('app.version'),
|
||||
'build' => config('app.build'),
|
||||
'url' => config('app.url'),
|
||||
|
||||
@@ -24,7 +24,7 @@ class SelfHostCheckForUpdateCommandTest extends TestCase
|
||||
{
|
||||
// Arrange
|
||||
Http::fake([
|
||||
'https://app.solidtime.io/api/check-for-update' => Http::response(['version' => '1.2.3'], 200),
|
||||
'https://app.solidtime.io/api/v1/ping/version' => Http::response(['version' => '1.2.3'], 200),
|
||||
]);
|
||||
|
||||
// Act
|
||||
@@ -40,7 +40,7 @@ class SelfHostCheckForUpdateCommandTest extends TestCase
|
||||
{
|
||||
// Arrange
|
||||
Http::fake([
|
||||
'https://app.solidtime.io/api/check-for-update' => Http::response(null, 500),
|
||||
'https://app.solidtime.io/api/v1/ping/version' => Http::response(null, 500),
|
||||
]);
|
||||
|
||||
// Act
|
||||
@@ -56,7 +56,7 @@ class SelfHostCheckForUpdateCommandTest extends TestCase
|
||||
{
|
||||
// Arrange
|
||||
Http::fake([
|
||||
'https://app.solidtime.io/api/check-for-update' => function (): void {
|
||||
'https://app.solidtime.io/api/v1/ping/version' => function (): void {
|
||||
throw new ConnectionException('Connection timed out');
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -23,7 +23,7 @@ class SelfHostTelemetryCommandTest extends TestCase
|
||||
{
|
||||
// Arrange
|
||||
Http::fake([
|
||||
'https://app.solidtime.io/api/telemetry' => Http::response(['success' => true], 200),
|
||||
'https://app.solidtime.io/api/v1/ping/telemetry' => Http::response(['success' => true], 200),
|
||||
]);
|
||||
|
||||
// Act
|
||||
@@ -39,7 +39,7 @@ class SelfHostTelemetryCommandTest extends TestCase
|
||||
{
|
||||
// Arrange
|
||||
Http::fake([
|
||||
'https://app.solidtime.io/api/telemetry' => Http::response(null, 500),
|
||||
'https://app.solidtime.io/api/v1/ping/telemetry' => Http::response(null, 500),
|
||||
]);
|
||||
|
||||
// Act
|
||||
@@ -55,7 +55,7 @@ class SelfHostTelemetryCommandTest extends TestCase
|
||||
{
|
||||
// Arrange
|
||||
Http::fake([
|
||||
'https://app.solidtime.io/api/telemetry' => function (): void {
|
||||
'https://app.solidtime.io/api/v1/ping/telemetry' => function (): void {
|
||||
throw new ConnectionException('Connection timed out');
|
||||
},
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user