Procházet zdrojové kódy

Minor fixes to post function

v2_uploadImages
Mike Carman před jednou hodinou
rodič
revize
bfce5ee48b
5 změnil soubory, kde provedl 226 přidání a 6 odebrání
  1. binární
      .swiftpm/xcode/package.xcworkspace/xcuserdata/mcarman.xcuserdatad/UserInterfaceState.xcuserstate
  2. +218
    -0
      .swiftpm/xcode/xcuserdata/mcarman.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. +4
    -5
      Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift
  4. +1
    -0
      Sources/App/DTO/V2.1/FuelEntryDTO.swift
  5. +3
    -1
      Sources/App/Models/FuelEntry.swift

binární
.swiftpm/xcode/package.xcworkspace/xcuserdata/mcarman.xcuserdatad/UserInterfaceState.xcuserstate Zobrazit soubor


+ 218
- 0
.swiftpm/xcode/xcuserdata/mcarman.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist Zobrazit soubor

@@ -164,5 +164,223 @@
landmarkType = "9">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "4D7F14D0-ED08-423F-B099-38D61A323334"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Models/FuelEntry.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "285"
endingLineNumber = "285"
landmarkName = "init(from:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "F780E27A-6B44-4CA1-B584-E095BC15C57D"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "649"
endingLineNumber = "649"
landmarkName = "create(req:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "69F0984D-1601-4AF5-BE09-C67CC4143CA8"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "648"
endingLineNumber = "648"
landmarkName = "create(req:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "E872CE7E-FDFD-4BAF-9E4D-6BC2AE7ED040"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Models/FuelEntry.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "291"
endingLineNumber = "291"
landmarkName = "init(from:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "F4FFD2D4-D060-42E1-A190-F9069A311629"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "666"
endingLineNumber = "666"
landmarkName = "create(req:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "638255FC-C3CE-4BDA-9A17-20B3673C7544"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "665"
endingLineNumber = "665"
landmarkName = "create(req:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "CDCEBD6E-46BC-4235-8E96-E63E8486B0B2"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "661"
endingLineNumber = "661"
landmarkName = "create(req:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "B5F6C965-701B-4342-A558-033C96744411"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "659"
endingLineNumber = "659"
landmarkName = "create(req:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "4BA9FF0F-7885-427C-BFB1-D1967AA88E83"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "671"
endingLineNumber = "671"
landmarkName = "create(req:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "96C20337-81C9-49B5-9456-AE00B5B367EA"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "670"
endingLineNumber = "670"
landmarkName = "create(req:)"
landmarkType = "7">
<Locations>
<Location
uuid = "96C20337-81C9-49B5-9456-AE00B5B367EA - d762ab0350a06ee2"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "(1) suspend resume partial function for App.FuelEntryV2ControllerV2_1.create(req: Vapor.Request) async throws -&gt; Vapor.Response"
moduleName = "App"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/mcarman/Projects/Vapor/fueling_v1/Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "670"
endingLineNumber = "670">
</Location>
<Location
uuid = "96C20337-81C9-49B5-9456-AE00B5B367EA - 8039ff4beb6fe6e6"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "(5) suspend resume partial function for App.FuelEntryV2ControllerV2_1.create(req: Vapor.Request) async throws -&gt; Vapor.Response"
moduleName = "App"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/mcarman/Projects/Vapor/fueling_v1/Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "670"
endingLineNumber = "670">
</Location>
<Location
uuid = "96C20337-81C9-49B5-9456-AE00B5B367EA - 273c71d5945c5dd6"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "(6) await resume partial function for App.FuelEntryV2ControllerV2_1.create(req: Vapor.Request) async throws -&gt; Vapor.Response"
moduleName = "App"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/mcarman/Projects/Vapor/fueling_v1/Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "670"
endingLineNumber = "670">
</Location>
<Location
uuid = "96C20337-81C9-49B5-9456-AE00B5B367EA - e15abd85ddbd5cbe"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "(10) suspend resume partial function for App.FuelEntryV2ControllerV2_1.create(req: Vapor.Request) async throws -&gt; Vapor.Response"
moduleName = "App"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/mcarman/Projects/Vapor/fueling_v1/Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "670"
endingLineNumber = "670">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

+ 4
- 5
Sources/App/Controllers/V2.1/FuelEntryControllerV2_1.swift Zobrazit soubor

@@ -644,7 +644,7 @@ struct FuelEntryV2ControllerV2_1: RouteCollection {

func create(req: Request) async throws -> [FuelEntry] {
func create(req: Request) async throws -> Response {
let fuelEntry = try req.content.decode([FuelEntry.V2_1_Input].self)
var results: [FuelEntry] = []
for entry in fuelEntry {
@@ -662,14 +662,13 @@ struct FuelEntryV2ControllerV2_1: RouteCollection {
}
}
input.save(on: req.db).whenFailure({ error in
})
try await input.save(on: req.db)
results.append(input)
}
// try await fuelEntry.create(on: req.db)
return results
let response = try await results.encodeResponse(for: req)
return response
}



+ 1
- 0
Sources/App/DTO/V2.1/FuelEntryDTO.swift Zobrazit soubor

@@ -24,6 +24,7 @@ extension FuelEntry {
var model: String?
var tankId: String?
var image: Data?
var userId: String?
}
struct V2_1_Output: Content {


+ 3
- 1
Sources/App/Models/FuelEntry.swift Zobrazit soubor

@@ -287,7 +287,9 @@ final class FuelEntry: Model, Content {
self.make = decoder.make ?? ""
self.model = decoder.model ?? ""
self.tankID = decoder.tankId ?? ""
self.userID = decoder.userId ?? ""
self.image = decoder.image
self.tabletserial = decoder.tabletSerial ?? ""
self.downloaded = false
}
}

Načítá se…
Zrušit
Uložit