Промежуточное
This commit is contained in:
parent
348e6a0b57
commit
c9fb6f4f33
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,9 +3,9 @@ package ru.ulstu.`is`.pmu.tank.api
|
||||
object ApiRoutes {
|
||||
const val BASE = "http://10.0.2.2:8079/"
|
||||
const val USER = "users"
|
||||
const val LEVEL = "level"
|
||||
const val NATION = "nation"
|
||||
const val TANK = "TANK"
|
||||
const val LEVEL = "levels"
|
||||
const val NATION = "nations"
|
||||
const val TANK = "tanks"
|
||||
const val USER_TANK = "userTanks"
|
||||
const val NOT_USER_TANK = "notUserTanks"
|
||||
}
|
@ -78,7 +78,7 @@ interface ServerService {
|
||||
@Query("_limit") limit: Int
|
||||
): List<NationRemote>
|
||||
|
||||
@GET(ApiRoutes.NATION)
|
||||
@GET("/getall/${ApiRoutes.NATION}")
|
||||
suspend fun getAllNations(): List<NationRemote>
|
||||
|
||||
@GET("${ApiRoutes.NATION}/{id}")
|
||||
@ -162,7 +162,7 @@ interface ServerService {
|
||||
// ![USER_TANK_CROSS_REF]
|
||||
|
||||
companion object {
|
||||
private const val BASE_URL = ApiRoutes.BASE
|
||||
private const val BASE_URL = "http://10.0.2.2:8079/"
|
||||
|
||||
@Volatile
|
||||
private var INSTANCE: ServerService? = null
|
||||
|
@ -32,6 +32,7 @@ class RestUserRepository(
|
||||
|
||||
override suspend fun insertUser(user: User) {
|
||||
service.insertUser(user.toRemote())
|
||||
dbUserRepository.insertUser(user)
|
||||
}
|
||||
|
||||
override suspend fun updateUser(user: User) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "fake-db",
|
||||
"name": "20-db",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"start": "json-server --watch data.json --host 0.0.0.0 -p 8079"
|
||||
|
Loading…
Reference in New Issue
Block a user