diff options
Diffstat (limited to 'opendc-common/src/main/kotlin/org/opendc/common/api/AssetsController.kt')
| -rw-r--r-- | opendc-common/src/main/kotlin/org/opendc/common/api/AssetsController.kt | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/opendc-common/src/main/kotlin/org/opendc/common/api/AssetsController.kt b/opendc-common/src/main/kotlin/org/opendc/common/api/AssetsController.kt deleted file mode 100644 index c6f34d19..00000000 --- a/opendc-common/src/main/kotlin/org/opendc/common/api/AssetsController.kt +++ /dev/null @@ -1,72 +0,0 @@ -package org.opendc.common.api - -import org.opendc.common.annotations.Endpoint -import io.javalin.http.Handler - -/** - * This class represents the `/assets` endpoint. - * - * @author Mateusz Kwiatkowski - * - * */ - - -//TODO: fix -> this is all wrong. -// Sending the experiment file is completely useless. -// You need to send tasks.parquet -public class AssetsController { - /** - * Returns a concatenated JSON string of all assets. - */ - @Endpoint("GET","/assets") - public fun getAssets() : Handler { - return Handler { ctx -> ctx.status(200) - println(ctx.body()) - } - } - - /** - * Returns an asset with `id` as a JSON string. - */ - @Endpoint("GET", "/assets/{id}") - public fun getAssetsId(): Handler { - return Handler { ctx -> ctx.status(200) } - } - - /** - * Saves the asset specified in the HTTP body. - * Returns the asset `id`. - */ - @Endpoint("POST", "/assets") - public fun postAsset() : Handler { - return Handler { ctx -> ctx.status(200) - println(ctx.body()) - } - } - - /** - * Modifies the specified asset. - * Deletes all results from experiments with this asset. - */ - @Endpoint("PUT", "/assets/{id}") - public fun putAssetId() : Handler { - return Handler { ctx -> ctx.status(200) } - } - - /** - * Deletes an asset with `id`. - * Deletes all results from experiments with this asset. - */ - @Endpoint("DELETE", "/assets/{id}") - public fun deleteAssetId() : Handler { - return Handler { ctx -> ctx.status(200) } - } - - /** - * Deletes all assets - */ - @Endpoint("DELETE", "/assets") - public fun deleteAsset() : Handler { - return Handler { ctx -> ctx.status(200) } - } -}
\ No newline at end of file |
