feat: add redis gateway protection and task recovery
This commit is contained in:
1 parent
cbc7317aa8
commit
473479fc4c
17 files changed
+272
-10
No files matched your search
@@ -6,6 +6,7 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -43,4 +44,13 @@ public class TaskController {
|
||||
) {
|
||||
return Map.of("task", tasks.get(authorization, id));
|
||||
}
|
||||
|
||||
@GetMapping("/tasks")
|
||||
public Map<String, Object> list(
|
||||
@RequestHeader(value = "Authorization", required = false) String authorization,
|
||||
@RequestParam(defaultValue = "50") int limit
|
||||
) {
|
||||
return Map.of("tasks", tasks.list(authorization, limit));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user