import { baseClient } from './base.js';

export const workspacesApi = {
  list() {
    return baseClient.get('/workspaces');
  },

  create(name) {
    return baseClient.post('/workspaces', { name });
  },

  get(id) {
    return baseClient.get(`/workspaces/${id}`);
  },

  update(id, name) {
    return baseClient.put(`/workspaces/${id}`, { name });
  },

  delete(id) {
    return baseClient.delete(`/workspaces/${id}`);
  },
};
