Coder Social home page Coder Social logo

ngankhanh98 / coursebox-server Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 2.0 1.94 MB

API for coursebox

Home Page: http://coursebox-server.herokuapp.com/api/

JavaScript 3.78% TypeScript 94.99% Shell 0.89% Dockerfile 0.30% Procfile 0.05%
course crud nestjsx teachers

coursebox-server's People

Contributors

ngankhanh98 avatar

Watchers

 avatar  avatar

coursebox-server's Issues

Smart way to use @ApiQuery()

Hiện tại chạy ổn:

Route /teacher/search?... đã cho phép search với 2 fields teacher_id hoặc/và fullname
image
Log được
image
Trong code để swagger hiện lên 2 fields cho điền, thì cần

...
 @Get('/search')
  // FIXME: how to shorten @ApiQuery, what if users are let to query with 100 filter \O/
  @ApiQuery({ name: 'teacher_id', required: false})
  @ApiQuery({ name: 'fullname', required: false })
  async find(@Query('') filter: string) {
    console.log('filter', filter);
  }

###Vấn đề là
Sau này có thể sẽ cho phép search với nhiều filter khác, như exp=3yrs, tag=web... nên sẽ cần thêm @ApiQuery() nữa, vậy có cách nào viết ngắn @ApiQuery({name: [<list>], required:false}) không ạ anh @dohoangdinhtien

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.