overleaf/services/web/frontend/js/features/word-count-modal/utils/api.js
Alf Eaton c8f139cced Merge pull request #3707 from overleaf/ae-refactor-word-count-modal
Refactor "Word Count" modal

GitOrigin-RevId: 00561b5b3f8f161238321c440ecde67cd42ece1c
2021-03-06 03:04:42 +00:00

10 lines
288 B
JavaScript

import { getJSON } from '../../../infrastructure/fetch-json'
export function fetchWordCount(projectId, clsiServerId, options) {
let query = ''
if (clsiServerId) {
query = `?clsiserverid=${clsiServerId}`
}
return getJSON(`/project/${projectId}/wordcount${query}`, options)
}