const CoolifyClient = require('../coolifyClient');

/**
 * List all domains.
 * @param {string} host_url
 * @param {string} token
 * @returns {Promise<Object[]>}
 * @example
 * list('https://coolify.example.com', 'TOKEN');
 */
async function list(host_url, token) {
  const client = new CoolifyClient(host_url, token);
  return client.get('/api/v1/domains');
}

module.exports = {
  list,
}; 