Gets the name of a number, even if it's stupidly big. Supersedes TheoryOfNekomata/number-name.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

37 satır
737 B

  1. import { FastifyInstance } from 'fastify';
  2. import { AdderController, AdderControllerImpl } from '@/modules/adder';
  3. export const addRoutes = (server: FastifyInstance) => {
  4. const adderController: AdderController = new AdderControllerImpl();
  5. return server
  6. .route({
  7. method: 'POST',
  8. url: '/add',
  9. schema: {
  10. body: {
  11. type: 'object',
  12. properties: {
  13. a: { type: 'number' },
  14. b: { type: 'number' },
  15. }
  16. }
  17. },
  18. handler: adderController.addNumbers,
  19. })
  20. .route({
  21. method: 'POST',
  22. url: '/subtract',
  23. schema: {
  24. body: {
  25. type: 'object',
  26. properties: {
  27. a: { type: 'number' },
  28. b: { type: 'number' },
  29. }
  30. }
  31. },
  32. handler: adderController.subtractNumbers,
  33. });
  34. };