@@ -76,30 +76,30 @@ class ModelReplicationServer(val repositoriesManager: RepositoriesManager) {
76
76
}
77
77
78
78
private fun Route.installHandlers () {
79
- post<Paths .v2GenerateClientIdPost > {
79
+ post<Paths .postGenerateClientId > {
80
80
call.respondText(storeClient.generateId(" clientId" ).toString())
81
81
}
82
- get<Paths .v2ServerIdGet > {
82
+ get<Paths .getServerId > {
83
83
call.respondText(repositoriesManager.getServerId())
84
84
}
85
- get<Paths .v2ServerIdGet > {
85
+ get<Paths .getServerId > {
86
86
call.respondText(repositoriesManager.getServerId())
87
87
}
88
- get<Paths .v2UserIdGet > {
88
+ get<Paths .getUserId > {
89
89
call.respondText(call.getUserName() ? : call.request.origin.remoteHost)
90
90
}
91
- get<Paths .v2RepositoriesGet > {
91
+ get<Paths .getRepositories > {
92
92
call.respondText(repositoriesManager.getRepositories().joinToString(" \n " ) { it.id })
93
93
}
94
94
95
- get<Paths .v2RepositoriesRepositoryBranchesGet > {
95
+ get<Paths .getRepositoryBranches > {
96
96
fun ApplicationCall.repositoryId () = RepositoryId (parameters[" repository" ]!! )
97
97
fun PipelineContext <Unit , ApplicationCall >.repositoryId () = call.repositoryId()
98
98
99
99
call.respondText(repositoriesManager.getBranchNames(repositoryId()).joinToString(" \n " ))
100
100
}
101
101
102
- get<Paths .v2RepositoriesRepositoryBranchesBranchGet > {
102
+ get<Paths .getRepositoryBranch > {
103
103
fun ApplicationCall.repositoryId () = RepositoryId (parameters[" repository" ]!! )
104
104
fun PipelineContext <Unit , ApplicationCall >.repositoryId () = call.repositoryId()
105
105
@@ -119,7 +119,7 @@ class ModelReplicationServer(val repositoriesManager: RepositoriesManager) {
119
119
call.respondDelta(versionHash, baseVersionHash)
120
120
}
121
121
122
- get<Paths .v2RepositoriesRepositoryBranchesBranchHashGet > {
122
+ get<Paths .getRepositoryBranchHash > {
123
123
fun ApplicationCall.repositoryId () = RepositoryId (parameters[" repository" ]!! )
124
124
fun PipelineContext <Unit , ApplicationCall >.repositoryId () = call.repositoryId()
125
125
@@ -138,7 +138,7 @@ class ModelReplicationServer(val repositoriesManager: RepositoriesManager) {
138
138
call.respondText(versionHash)
139
139
}
140
140
141
- post<Paths .v2RepositoriesRepositoryInitPost > {
141
+ post<Paths .initializeRepository > {
142
142
fun ApplicationCall.repositoryId () = RepositoryId (parameters[" repository" ]!! )
143
143
fun PipelineContext <Unit , ApplicationCall >.repositoryId () = call.repositoryId()
144
144
@@ -208,7 +208,7 @@ class ModelReplicationServer(val repositoriesManager: RepositoriesManager) {
208
208
}
209
209
}
210
210
211
- get<Paths .v2RepositoriesRepositoryVersionsVersionHashGet > {
211
+ get<Paths .getRepositoryVersionHash > {
212
212
fun ApplicationCall.repositoryId () = RepositoryId (parameters[" repository" ]!! )
213
213
fun PipelineContext <Unit , ApplicationCall >.repositoryId () = call.repositoryId()
214
214
0 commit comments