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

export const domainsApi = {
  list(workspaceId) {
    return baseClient.get(`/workspaces/${workspaceId}/domains`);
  },

  add(workspaceId, hostname) {
    return baseClient.post(`/workspaces/${workspaceId}/domains`, { hostname });
  },

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

  verify(workspaceId, id) {
    return baseClient.post(`/workspaces/${workspaceId}/domains/${id}/verify`);
  },
};
