Skip to content

Instantly share code, notes, and snippets.

View fananek's full-sized avatar

František Mikš fananek

View GitHub Profile
@fananek
fananek / DocumentStatus.swift
Last active March 1, 2021 15:13
Vapor 4 - pass filter as an argument to repository method
enum DocumentStatus: String, Codable, CaseIterable {
case draft, published, archived
}
@fananek
fananek / Vapor4_Pivot_EagerLoading.swift
Last active January 18, 2021 22:42
Fluent - Eager load property stored in a pivot model - Vapor 4
import Fluent
import Vapor
// Todo model
final class Todo: Model, Content {
static let schema = "todos"
@ID(key: .id)
var id: UUID?