chore(backend): rename lastSyncTimestamp to since across Ping sync API for consistency
- Updated parameter name in `PingController`, `PingApi`, and related tests to align with SyncManager conventions.
This commit is contained in:
parent
cf7179ed64
commit
05e85ff98e
|
|
@ -80,9 +80,10 @@ class PingController(
|
|||
|
||||
@GetMapping("/ping/sync")
|
||||
override suspend fun syncPings(
|
||||
@RequestParam(required = false, defaultValue = "0") lastSyncTimestamp: Long
|
||||
// Changed the parameter name to 'since' to match SyncManager convention
|
||||
@RequestParam(required = false, defaultValue = "0") since: Long
|
||||
): List<PingEvent> {
|
||||
return pingUseCase.getPingsSince(lastSyncTimestamp).map {
|
||||
return pingUseCase.getPingsSince(since).map {
|
||||
PingEvent(
|
||||
id = it.id.toString(),
|
||||
message = it.message,
|
||||
|
|
|
|||
|
|
@ -153,7 +153,8 @@ class PingControllerTest {
|
|||
)
|
||||
|
||||
// When & Then
|
||||
val mvcResult: MvcResult = mockMvc.perform(get("/ping/sync").param("lastSyncTimestamp", timestamp.toString()))
|
||||
// Changed parameter name to 'since' to match the controller update
|
||||
val mvcResult: MvcResult = mockMvc.perform(get("/ping/sync").param("since", timestamp.toString()))
|
||||
.andExpect(request().asyncStarted())
|
||||
.andReturn()
|
||||
|
||||
|
|
|
|||
|
|
@ -10,5 +10,6 @@ interface PingApi {
|
|||
suspend fun securePing(): PingResponse
|
||||
|
||||
// Phase 3: Delta-Sync
|
||||
suspend fun syncPings(lastSyncTimestamp: Long): List<PingEvent>
|
||||
// Changed parameter name to 'since' to match SyncManager convention and backend controller
|
||||
suspend fun syncPings(since: Long): List<PingEvent>
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user