import request from './request'

export function recalculateRisk(projectId?: number) {
  return request.post('/risk/recalculate', null, { params: projectId ? { project_id: projectId } : undefined })
}

export function getRiskTop(n: number = 10) {
  return request.get('/risk/top', { params: { n } })
}

export function getProjectRisk(projectId: number) {
  return request.get(`/risk/projects/${projectId}`)
}
