25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

28 satır
687 B

  1. import Foundation
  2. import Fluent
  3. import Vapor
  4. import Crypto
  5. //import JWT
  6. //struct Example: JWTPayload, Content{
  7. //
  8. // var test: String
  9. // func verify(using signer: JWTSigner) throws{}
  10. //}
  11. func routes(_ app: Application) throws {
  12. app.routes.caseInsensitive = true
  13. app.routes.defaultMaxBodySize = "64mb";
  14. let baseApp = app.grouped("api").grouped("v1.0")
  15. baseApp.get { req async in
  16. "Training Services Version 1.0"
  17. }
  18. try baseApp.register(collection: cntrlAssociate())
  19. try baseApp.register(collection: cntrlDepartment())
  20. try baseApp.register(collection: cntrlDocument())
  21. try baseApp.register(collection: cntrlDocType())
  22. }