Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

feat(20-4): Add frontend workflow API methods

Juan Denis4e2e7ec03123
diff --git a/frontend/src/services/api.js b/frontend/src/services/api.js
index 3f13cfa4..a5cf17ff 100644
--- a/frontend/src/services/api.js
+++ b/frontend/src/services/api.js
@@ -2220,6 +2220,37 @@ class ApiService {
async getSecurityEvents(limit = 100) {
return this.request(`/security/events?limit=${limit}`);
}
+
+ // ========================================
+ // Workflow endpoints
+ // ========================================
+ async getWorkflows() {
+ return this.request('/workflows');
+ }
+
+ async getWorkflow(id) {
+ return this.request(`/workflows/${id}`);
+ }
+
+ async createWorkflow(data) {
+ return this.request('/workflows', {
+ method: 'POST',
+ body: data
+ });
+ }
+
+ async updateWorkflow(id, data) {
+ return this.request(`/workflows/${id}`, {
+ method: 'PUT',
+ body: data
+ });
+ }
+
+ async deleteWorkflow(id) {
+ return this.request(`/workflows/${id}`, {
+ method: 'DELETE'
+ });
+ }
}
export const api = new ApiService();