Add language statistics API endpoint (#11737)

* Add language statistics API

* Add tests
This commit is contained in:
Lauris BH 2020-06-07 14:48:41 +03:00 committed by GitHub
parent 94f60e199b
commit 2874ab54bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 184 additions and 0 deletions

View file

@ -855,6 +855,7 @@ func RegisterRoutes(m *macaron.Macaron) {
Delete(reqToken(), repo.DeleteTopic)
}, reqAdmin())
}, reqAnyRepoReader())
m.Get("/languages", reqRepoReader(models.UnitTypeCode), repo.GetLanguages)
}, repoAssignment())
})