Skip to content

Commit

Permalink
Rename filesEndpoint to attachmentsEndpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hb0 committed Nov 13, 2023
1 parent d8e98ee commit 36c0d80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/de/cyface/uploader/DefaultUploader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ class DefaultUploader(private val apiEndpoint: String) : Uploader {
file: File,
progressListener: UploadProgressListener
): Result {
val endpoint = filesEndpoint(measurementId)
val endpoint = attachmentsEndpoint(measurementId)
return uploadFile(jwtToken, metaData, file, endpoint, progressListener)
}

override fun measurementsEndpoint(): URL {
return URL(returnUrlWithTrailingSlash(apiEndpoint) + "measurements")
}

override fun filesEndpoint(measurementId: Long): URL {
return URL(returnUrlWithTrailingSlash(apiEndpoint) + "measurements/$measurementId/files")
override fun attachmentsEndpoint(measurementId: Long): URL {
return URL(returnUrlWithTrailingSlash(apiEndpoint) + "measurements/$measurementId/attachments")
}

@Throws(UploadFailed::class)
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/de/cyface/uploader/Uploader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ interface Uploader {
* @throws MalformedURLException if the endpoint address is malformed.
*/
@Throws(MalformedURLException::class)
fun filesEndpoint(measurementId: Long): URL
fun attachmentsEndpoint(measurementId: Long): URL
}

0 comments on commit 36c0d80

Please sign in to comment.