Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
Backend Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SpinShare
Backend Server
Commits
2f394319
Commit
2f394319
authored
Apr 02, 2020
by
Andreas Heimann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added current version api call
parent
a4ce8eca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
src/Controller/APIController.php
src/Controller/APIController.php
+10
-1
No files found.
src/Controller/APIController.php
View file @
2f394319
...
@@ -16,6 +16,7 @@ use App\Entity\Ad;
...
@@ -16,6 +16,7 @@ use App\Entity\Ad;
class
APIController
extends
AbstractController
class
APIController
extends
AbstractController
{
{
public
$currentVersion
=
1
;
public
$currentVersion
=
1
;
public
$clientVersion
=
[
1
,
0
,
0
];
/**
/**
* @Route("/api/ping", name="api.ping")
* @Route("/api/ping", name="api.ping")
...
@@ -25,6 +26,14 @@ class APIController extends AbstractController
...
@@ -25,6 +26,14 @@ class APIController extends AbstractController
return
new
JsonResponse
([
'version'
=>
$this
->
currentVersion
,
'status'
=>
200
,
'pong'
=>
true
]);
return
new
JsonResponse
([
'version'
=>
$this
->
currentVersion
,
'status'
=>
200
,
'pong'
=>
true
]);
}
}
/**
* @Route("/api/currentVersion", name="api.currentVersion")
*/
public
function
currentVersion
()
{
return
new
JsonResponse
([
'version'
=>
$this
->
currentVersion
,
'status'
=>
200
,
'data'
=>
$this
->
clientVersion
]);
}
/**
/**
* @Route("/api/songs/new/{offset}", name="api.songs.new")
* @Route("/api/songs/new/{offset}", name="api.songs.new")
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment