'use strict';

async function getVenderList (ctx) {
   const models = ctx.fs.dc.models;
   try {
      const res = await models.Vender.findAll({
         order: [
            ['id', 'ASC']
         ]
      })

      ctx.status = 200;
      ctx.body = res
   } catch (error) {
      ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
      ctx.status = 400;
      ctx.body = {}
   }
}

module.exports = {
   getVenderList,
};