Fix github stars endpoint (#5301)

- Encapsulated GitHub star response in an object
- Fixed rounding of Github stars to align with Github convention
- Fixed CORS issue so that endpoint can be called from twenty.com and
app.twenty.com

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
This commit is contained in:
Ady Beraud
2024-05-07 09:35:54 +03:00
committed by GitHub
parent a2017eaeb7
commit b438fc2754
3 changed files with 36 additions and 3 deletions

View File

@ -1,3 +1,3 @@
export const formatNumberOfStars = (numberOfStars: number) => {
return Math.floor(numberOfStars / 100) / 10 + 'k';
return Math.ceil(numberOfStars / 100) / 10 + 'k';
};