overleaf/services/web/frontend/js/features/word-count-modal/utils/api.js

11 lines
288 B
JavaScript
Raw Normal View History

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)
}