cityssm/parking-ticket-system

View on GitHub
handlers/plates-post/doGetModelsByMake.ts

Summary

Maintainability
A
0 mins
Test Coverage
import type { Request, Response } from 'express'

import { getModelsByMakeFromCache } from '../../helpers/functions.vehicle.js'

export default function handler(request: Request, response: Response): void {
  const makeModelList = getModelsByMakeFromCache(
    request.body.vehicleMake as string
  )

  response.json(makeModelList)
}