[PROTOBUS] Move showTaskWithID to protobus (#3283)
* showTaskWithID protobus migration * replaced ShowTaskWithIdRequest with generic stringRequest * prettier
This commit is contained in:
1 parent
a02bf11c81
commit
ca3cf185cf
8 files changed
+34
-6
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { Controller } from ".."
|
||||
import { Empty, StringRequest } from "../../../shared/proto/common"
|
||||
|
||||
/**
|
||||
* Shows a task with the specified ID
|
||||
* @param controller The controller instance
|
||||
* @param request The request containing the task ID
|
||||
* @returns Empty response
|
||||
*/
|
||||
export async function showTaskWithId(controller: Controller, request: StringRequest): Promise<Empty> {
|
||||
try {
|
||||
await controller.showTaskWithId(request.value)
|
||||
return Empty.create()
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user