diff --git a/Sources/App/Controllers/BaseControllers/cntrlEquipmentType.swift b/Sources/App/Controllers/BaseControllers/cntrlEquipmentType.swift index 14829b0..cd1e04b 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlEquipmentType.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlEquipmentType.swift @@ -1,8 +1,49 @@ // -// File 4.swift -// +// cntrlEquipmentType.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlEquipmentType: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("equipmenttypes") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlEquipmentType] { + try await mdlEquipmentType.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlEquipmentType { + let obj = try req.content.decode(mdlEquipmentType.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlEquipmentType{ + let obj = try req.content.decode(mdlEquipmentType.self) + let dbobj = try await mdlEquipmentType.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlEquipmentType.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlFluid.swift b/Sources/App/Controllers/BaseControllers/cntrlFluid.swift index 4782d85..a726ef1 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlFluid.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlFluid.swift @@ -1,8 +1,49 @@ // -// File 5.swift -// +// cntrlFluid.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlFluid: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("fluids") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlFluid] { + try await mdlFluid.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlFluid { + let obj = try req.content.decode(mdlFluid.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlFluid{ + let obj = try req.content.decode(mdlFluid.self) + let dbobj = try await mdlFluid.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlFluid.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlIncompleteReason.swift b/Sources/App/Controllers/BaseControllers/cntrlIncompleteReason.swift index f2f19ea..ed17786 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlIncompleteReason.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlIncompleteReason.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlIncompleteReason.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlIncompleteReason: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("incompletereasons") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlIncompleteReason] { + try await mdlIncompleteReason.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlIncompleteReason { + let obj = try req.content.decode(mdlIncompleteReason.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlIncompleteReason{ + let obj = try req.content.decode(mdlIncompleteReason.self) + let dbobj = try await mdlIncompleteReason.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlIncompleteReason.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlInputType.swift b/Sources/App/Controllers/BaseControllers/cntrlInputType.swift index a0490df..d2e5e7f 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlInputType.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlInputType.swift @@ -1,8 +1,49 @@ // -// File.swift -// +// cntrlInputType.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlInputType: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("inputtypes") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlInputType] { + try await mdlInputType.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlInputType { + let obj = try req.content.decode(mdlInputType.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlInputType{ + let obj = try req.content.decode(mdlInputType.self) + let dbobj = try await mdlInputType.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlInputType.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlJobSite.swift b/Sources/App/Controllers/BaseControllers/cntrlJobSite.swift index f2f19ea..8afa17c 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlJobSite.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlJobSite.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlJobSite.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlJobSite: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("jobsites") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlJobSite] { + try await mdlJobSite.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlJobSite { + let obj = try req.content.decode(mdlJobSite.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlJobSite{ + let obj = try req.content.decode(mdlJobSite.self) + let dbobj = try await mdlJobSite.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlJobSite.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlLevel.swift b/Sources/App/Controllers/BaseControllers/cntrlLevel.swift index f2f19ea..51eea06 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlLevel.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlLevel.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlLevel.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlLevel: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("levels") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlLevel] { + try await mdlLevel.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlLevel { + let obj = try req.content.decode(mdlLevel.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlLevel{ + let obj = try req.content.decode(mdlLevel.self) + let dbobj = try await mdlLevel.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlLevel.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlLocation.swift b/Sources/App/Controllers/BaseControllers/cntrlLocation.swift index f2f19ea..2f22bed 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlLocation.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlLocation.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlLocation.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlLocation: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("locations") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlLocation] { + try await mdlLocation.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlLocation { + let obj = try req.content.decode(mdlLocation.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlLocation{ + let obj = try req.content.decode(mdlLocation.self) + let dbobj = try await mdlLocation.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlLocation.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlNoteType.swift b/Sources/App/Controllers/BaseControllers/cntrlNoteType.swift index f2f19ea..7c916c7 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlNoteType.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlNoteType.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlNoteType.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlNoteType: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("notetypes") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlNoteType] { + try await mdlNoteType.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlNoteType { + let obj = try req.content.decode(mdlNoteType.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlNoteType{ + let obj = try req.content.decode(mdlNoteType.self) + let dbobj = try await mdlNoteType.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlNoteType.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlPart.swift b/Sources/App/Controllers/BaseControllers/cntrlPart.swift index f2f19ea..a0ce52a 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlPart.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlPart.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlPart.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlPart: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("parts") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlPart] { + try await mdlPart.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlPart { + let obj = try req.content.decode(mdlPart.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlPart{ + let obj = try req.content.decode(mdlPart.self) + let dbobj = try await mdlPart.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlPart.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlPriority.swift b/Sources/App/Controllers/BaseControllers/cntrlPriority.swift index f2f19ea..ca2435a 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlPriority.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlPriority.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlPriority.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlPriority: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("priorities") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlPriority] { + try await mdlPriority.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlPriority { + let obj = try req.content.decode(mdlPriority.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlPriority{ + let obj = try req.content.decode(mdlPriority.self) + let dbobj = try await mdlPriority.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlPriority.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlReason.swift b/Sources/App/Controllers/BaseControllers/cntrlReason.swift index f2f19ea..4077f72 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlReason.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlReason.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlReason.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlReason: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("resons") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlReason] { + try await mdlReason.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlReason { + let obj = try req.content.decode(mdlReason.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlReason{ + let obj = try req.content.decode(mdlReason.self) + let dbobj = try await mdlReason.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlReason.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlRepairType.swift b/Sources/App/Controllers/BaseControllers/cntrlRepairType.swift index f2f19ea..d9f9174 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlRepairType.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlRepairType.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlRepairType.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlRepairType: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("repairtypes") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlRepairType] { + try await mdlRepairType.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlRepairType { + let obj = try req.content.decode(mdlRepairType.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlRepairType{ + let obj = try req.content.decode(mdlRepairType.self) + let dbobj = try await mdlRepairType.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlRepairType.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlSMSCCode.swift b/Sources/App/Controllers/BaseControllers/cntrlSMSCCode.swift index f2f19ea..6cc48ce 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlSMSCCode.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlSMSCCode.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlSMSCCode.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlSMSCCode: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("smsccodes") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlSMSCCode] { + try await mdlSMSCCode.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlSMSCCode { + let obj = try req.content.decode(mdlSMSCCode.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlSMSCCode{ + let obj = try req.content.decode(mdlSMSCCode.self) + let dbobj = try await mdlSMSCCode.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlSMSCCode.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlSignatureType.swift b/Sources/App/Controllers/BaseControllers/cntrlSignatureType.swift index f2f19ea..83ae730 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlSignatureType.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlSignatureType.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlSignatureType.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlSignatureType: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("signaturetypes") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlSignatureType] { + try await mdlSignatureType.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlSignatureType { + let obj = try req.content.decode(mdlSignatureType.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlSignatureType{ + let obj = try req.content.decode(mdlSignatureType.self) + let dbobj = try await mdlSignatureType.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlSignatureType.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlState.swift b/Sources/App/Controllers/BaseControllers/cntrlState.swift index f2f19ea..4d48b07 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlState.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlState.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlState.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlState: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("states") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlState] { + try await mdlState.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlState { + let obj = try req.content.decode(mdlState.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlState{ + let obj = try req.content.decode(mdlState.self) + let dbobj = try await mdlState.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlState.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlStatus.swift b/Sources/App/Controllers/BaseControllers/cntrlStatus.swift index f2f19ea..647aa99 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlStatus.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlStatus.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlStatus.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlStatus: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("statuses") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlStatus] { + try await mdlStatus.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlStatus { + let obj = try req.content.decode(mdlStatus.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlStatus{ + let obj = try req.content.decode(mdlStatus.self) + let dbobj = try await mdlStatus.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlStatus.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/BaseControllers/cntrlViscosity.swift b/Sources/App/Controllers/BaseControllers/cntrlViscosity.swift index f2f19ea..66f8a6d 100644 --- a/Sources/App/Controllers/BaseControllers/cntrlViscosity.swift +++ b/Sources/App/Controllers/BaseControllers/cntrlViscosity.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlViscosity.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlViscosity: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("viscosities") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlViscosity] { + try await mdlViscosity.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlViscosity { + let obj = try req.content.decode(mdlViscosity.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlViscosity{ + let obj = try req.content.decode(mdlViscosity.self) + let dbobj = try await mdlViscosity.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlViscosity.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CompartmentControllers/cntrlCompartment.swift b/Sources/App/Controllers/CompartmentControllers/cntrlCompartment.swift index f2f19ea..11e985b 100644 --- a/Sources/App/Controllers/CompartmentControllers/cntrlCompartment.swift +++ b/Sources/App/Controllers/CompartmentControllers/cntrlCompartment.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlCompartment.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlCompartment: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("compartments") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlCompartment] { + try await mdlCompartment.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlCompartment { + let obj = try req.content.decode(mdlCompartment.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlCompartment{ + let obj = try req.content.decode(mdlCompartment.self) + let dbobj = try await mdlCompartment.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlCompartment.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CompartmentControllers/cntrlCompartmentLocation.swift b/Sources/App/Controllers/CompartmentControllers/cntrlCompartmentLocation.swift index a0490df..a9d2bde 100644 --- a/Sources/App/Controllers/CompartmentControllers/cntrlCompartmentLocation.swift +++ b/Sources/App/Controllers/CompartmentControllers/cntrlCompartmentLocation.swift @@ -1,8 +1,49 @@ // -// File.swift -// +// cntrlCompartmentLocation.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlCompartmentLocation: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("comparmentlocations") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlCompartmentLocation] { + try await mdlCompartmentLocation.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlCompartmentLocation { + let obj = try req.content.decode(mdlCompartmentLocation.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlCompartmentLocation{ + let obj = try req.content.decode(mdlCompartmentLocation.self) + let dbobj = try await mdlCompartmentLocation.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlCompartmentLocation.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CustomerControllers/cntrlContact.swift b/Sources/App/Controllers/CustomerControllers/cntrlContact.swift index a0490df..f293e9c 100644 --- a/Sources/App/Controllers/CustomerControllers/cntrlContact.swift +++ b/Sources/App/Controllers/CustomerControllers/cntrlContact.swift @@ -1,8 +1,49 @@ // -// File.swift -// +// cntrlContact.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlContact: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("contacts") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlContact] { + try await mdlContact.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlContact { + let obj = try req.content.decode(mdlContact.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlContact{ + let obj = try req.content.decode(mdlContact.self) + let dbobj = try await mdlContact.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlContact.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CustomerControllers/cntrlContactInfo.swift b/Sources/App/Controllers/CustomerControllers/cntrlContactInfo.swift index f2f19ea..da1994b 100644 --- a/Sources/App/Controllers/CustomerControllers/cntrlContactInfo.swift +++ b/Sources/App/Controllers/CustomerControllers/cntrlContactInfo.swift @@ -1,8 +1,49 @@ // -// File 2.swift -// +// cntrlContactInfo.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlContactInfo: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("contactinfos") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlContactInfo] { + try await mdlContactInfo.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlContactInfo { + let obj = try req.content.decode(mdlContactInfo.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlContactInfo{ + let obj = try req.content.decode(mdlContactInfo.self) + let dbobj = try await mdlContactInfo.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlContactInfo.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CustomerControllers/cntrlCustomer.swift b/Sources/App/Controllers/CustomerControllers/cntrlCustomer.swift index d0b8c0e..64d5273 100644 --- a/Sources/App/Controllers/CustomerControllers/cntrlCustomer.swift +++ b/Sources/App/Controllers/CustomerControllers/cntrlCustomer.swift @@ -1,8 +1,49 @@ // -// File 3.swift -// +// cntrlCustomer.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlCustomer: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("customers") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlCustomer] { + try await mdlCustomer.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlCustomer { + let obj = try req.content.decode(mdlCustomer.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlCustomer{ + let obj = try req.content.decode(mdlCustomer.self) + let dbobj = try await mdlCustomer.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlCustomer.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CustomerControllers/cntrlEquipment.swift b/Sources/App/Controllers/CustomerControllers/cntrlEquipment.swift index 14829b0..c9b614b 100644 --- a/Sources/App/Controllers/CustomerControllers/cntrlEquipment.swift +++ b/Sources/App/Controllers/CustomerControllers/cntrlEquipment.swift @@ -1,8 +1,49 @@ // -// File 4.swift -// +// cntrlEquipment.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlEquipment: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("equipments") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlEquipment] { + try await mdlEquipment.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlEquipment { + let obj = try req.content.decode(mdlEquipment.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlEquipment{ + let obj = try req.content.decode(mdlEquipment.self) + let dbobj = try await mdlEquipment.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlEquipment.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CustomerControllers/cntrlMake.swift b/Sources/App/Controllers/CustomerControllers/cntrlMake.swift index 4782d85..5de1936 100644 --- a/Sources/App/Controllers/CustomerControllers/cntrlMake.swift +++ b/Sources/App/Controllers/CustomerControllers/cntrlMake.swift @@ -1,8 +1,49 @@ // -// File 5.swift -// +// cntrlMake.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlMake: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("makes") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlMake] { + try await mdlMake.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlMake { + let obj = try req.content.decode(mdlMake.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlMake{ + let obj = try req.content.decode(mdlMake.self) + let dbobj = try await mdlMake.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlMake.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CustomerControllers/cntrlModel.swift b/Sources/App/Controllers/CustomerControllers/cntrlModel.swift index a4f4c80..3e3005b 100644 --- a/Sources/App/Controllers/CustomerControllers/cntrlModel.swift +++ b/Sources/App/Controllers/CustomerControllers/cntrlModel.swift @@ -1,8 +1,49 @@ // -// File 6.swift -// +// cntrlModel.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlModel: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("models") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlModel] { + try await mdlModel.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlModel { + let obj = try req.content.decode(mdlModel.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlModel{ + let obj = try req.content.decode(mdlModel.self) + let dbobj = try await mdlModel.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlModel.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CustomerControllers/cntrlObjectProperty.swift b/Sources/App/Controllers/CustomerControllers/cntrlObjectProperty.swift index 2a7b01d..9e18c87 100644 --- a/Sources/App/Controllers/CustomerControllers/cntrlObjectProperty.swift +++ b/Sources/App/Controllers/CustomerControllers/cntrlObjectProperty.swift @@ -1,8 +1,49 @@ // -// File 7.swift -// +// cntrlObjectProperty.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlObjProperty: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("objproperies") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlObjProperty] { + try await mdlObjProperty.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlObjProperty { + let obj = try req.content.decode(mdlObjProperty.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlObjProperty{ + let obj = try req.content.decode(mdlObjProperty.self) + let dbobj = try await mdlObjProperty.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlObjProperty.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/CustomerControllers/cntrlProduct.swift b/Sources/App/Controllers/CustomerControllers/cntrlProduct.swift index a0490df..dbd6079 100644 --- a/Sources/App/Controllers/CustomerControllers/cntrlProduct.swift +++ b/Sources/App/Controllers/CustomerControllers/cntrlProduct.swift @@ -1,8 +1,49 @@ // -// File.swift -// +// cntrlProduct.swift // -// Created by Michiel Carman on 4/2/24. // +// Created by Michiel Carman on 4/1/24. +// + +import Fluent +import Vapor -import Foundation +struct cntrlProduct: RouteCollection { + func boot(routes: RoutesBuilder) throws { + let rts = routes.grouped("products") + rts.get(use: index) + rts.post(use: create) + rts.put(use: update) + rts.group(":id") { rt in + rts.delete(use: delete) + } + } + + func index(req: Request) async throws -> [mdlProduct] { + try await mdlProduct.query(on: req.db).all() + } + + func create(req: Request) async throws -> mdlProduct { + let obj = try req.content.decode(mdlProduct.self) + try await obj.save(on: req.db) + return obj + } + func update(req: Request) async throws -> mdlProduct{ + let obj = try req.content.decode(mdlProduct.self) + let dbobj = try await mdlProduct.query(on: req.db).filter(\.$id == obj.id!).first()! + + dbobj.updatedate = Date() + dbobj.updateuserid = -1 + try await dbobj.update(on: req.db) + return dbobj + + } + + func delete(req: Request) async throws -> HTTPStatus { + guard let obj = try await mdlProduct.find(req.parameters.get("id"), on: req.db) else { + throw Abort(.notFound) + } + try await obj.delete(on: req.db) + return .noContent + } +} diff --git a/Sources/App/Controllers/GlobalFunctions/EncryptionController.swift b/Sources/App/Controllers/GlobalFunctions/EncryptionController.swift index aa6b82d..dbd70d8 100644 --- a/Sources/App/Controllers/GlobalFunctions/EncryptionController.swift +++ b/Sources/App/Controllers/GlobalFunctions/EncryptionController.swift @@ -15,9 +15,9 @@ enum CryptoError: Error{ struct CustomCrypto{ public static func DecryptString(input: String) throws -> String{ - let apikey = Environment.get("API_KEY") + let apikey = Environment.get("API_KEY") ?? "rv0ywT7Ygwh01jP1dQWBP39ogjq5ladO+EoNUGcBVq0=" print(apikey) - let base64Key = "rv0ywT7Ygwh01jP1dQWBP39ogjq5ladO+EoNUGcBVq0=" // Replace with your actual key + let base64Key = apikey // Replace with your actual key guard let keyData = Data(base64Encoded: base64Key) else { fatalError("Invalid Base64 key data") } diff --git a/Sources/App/routes.swift b/Sources/App/routes.swift index 538f715..7f2e019 100644 --- a/Sources/App/routes.swift +++ b/Sources/App/routes.swift @@ -27,6 +27,36 @@ func routes(_ app: Application) throws { try baseApp.register(collection: cntrlSegment()) try baseApp.register(collection: cntrlResponseType()) try baseApp.register(collection: cntrlUnit()) + try baseApp.register(collection: cntrlComparisonType()) + try baseApp.register(collection: cntrlEquipmentType()) + try baseApp.register(collection: cntrlFluid()) + try baseApp.register(collection: cntrlFuel()) + try baseApp.register(collection: cntrlIncompleteReason()) + try baseApp.register(collection: cntrlInputType()) + try baseApp.register(collection: cntrlJobSite()) + try baseApp.register(collection: cntrlLevel()) + try baseApp.register(collection: cntrlLocation()) + try baseApp.register(collection: cntrlNoteType()) + try baseApp.register(collection: cntrlPart()) + try baseApp.register(collection: cntrlPriority()) + try baseApp.register(collection: cntrlReason()) + try baseApp.register(collection: cntrlRepairType()) + try baseApp.register(collection: cntrlSignatureType()) + try baseApp.register(collection: cntrlState()) + try baseApp.register(collection: cntrlStatus()) + try baseApp.register(collection: cntrlValueType()) + try baseApp.register(collection: cntrlViscosity()) + try baseApp.register(collection: cntrlCompartment()) + try baseApp.register(collection: cntrlCompartmentLocation()) + try baseApp.register(collection: cntrlContact()) + try baseApp.register(collection: cntrlContactInfo()) + try baseApp.register(collection: cntrlCustomer()) + try baseApp.register(collection: cntrlEquipment()) + try baseApp.register(collection: cntrlMake()) + try baseApp.register(collection: cntrlModel()) + try baseApp.register(collection: cntrlObjProperty()) + try baseApp.register(collection: cntrlProduct()) + } diff --git a/old.env b/old.env new file mode 100644 index 0000000..3a8d168 --- /dev/null +++ b/old.env @@ -0,0 +1 @@ +API_KEY="rv0ywT7Ygwh01jP1dQWBP39ogjq5ladO+EoNUGcBVq0="