You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

20 line
543 B

  1. import Foundation
  2. import Fluent
  3. import Vapor
  4. import Crypto
  5. func routes(_ app: Application) throws {
  6. app.routes.caseInsensitive = true
  7. app.routes.defaultMaxBodySize = "64mb";
  8. let baseApp = app.grouped("api").grouped("v1.0")
  9. baseApp.get { req async in
  10. "Training Services Version 1.0"
  11. }
  12. try baseApp.register(collection: cntrlAssociate())
  13. try baseApp.register(collection: cntrlDepartment())
  14. try baseApp.register(collection: cntrlDocument())
  15. try baseApp.register(collection: cntrlDocType())
  16. }