Skip to content

Instantly share code, notes, and snippets.

@jsdmultisys
Last active April 20, 2020 04:35
Show Gist options
  • Save jsdmultisys/511653cc4091e118cf567f1c23549759 to your computer and use it in GitHub Desktop.
Save jsdmultisys/511653cc4091e118cf567f1c23549759 to your computer and use it in GitHub Desktop.
List all retailers
const retailers = await Retailer.all()
if(!retailer) {
throw YourCustomerErrorClass('your-message')
}
return response.json({data: retailers})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment