Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
marcprux committed Jan 8, 2024
1 parent 9aac5c9 commit d5584a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Skip.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PRODUCT_NAME = FireSide
PRODUCT_BUNDLE_IDENTIFIER = skip.fireside.App

// The semantic version of the app
MARKETING_VERSION = 0.0.1
MARKETING_VERSION = 0.0.2

// The build number specifying the internal app version
CURRENT_PROJECT_VERSION = 1
Expand Down
17 changes: 16 additions & 1 deletion Sources/FireSideModel/FireSideModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,22 @@ public actor FireSideStore {

@MainActor public func startNewChat() async throws -> String {
logger.info("startNewChat")
return "12345678"

let cref = firestore.collection("messages")
let snapshot = try await cref.getDocuments()
logger.log("cref document: \(snapshot)")
for document in snapshot.documents {
logger.log("read cref: \(document.documentID) => \(document.data())")
}

let dref = try await cref.addDocument(data: [
"m": "some message",
"t": Date.now.timeIntervalSince1970,
])

logger.log("created document: \(dref.documentID)")

return dref.documentID
}

@MainActor public func runTask() async throws {
Expand Down

0 comments on commit d5584a9

Please sign in to comment.