Skip to content

Instantly share code, notes, and snippets.

@mazz mazz/snippet.swift
Created Sep 21, 2019

What would you like to do?
public func fetchCourses() -> Single<[MbyCourse]> {
return Single.create { [unowned self] single in
do {
var fetchCourses: [MbyCourse] = []
// let chapters: [Org]!
try { db in
fetchCourses = try MbyCourse.fetchAll(db)
} catch {
print("error: \(error)")
return Disposables.create {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.