Skip to content

Commit

Permalink
Update PushNotifications.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
jblanked committed Jun 22, 2024
1 parent e2dc65f commit 0396753
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/PushNotifications.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public class Easybase
{
do
{
let message = Message(message: message)
let message = EasyPushMessage(message: message)
let response = try await client.from(table).insert(message).execute()
return true
}
Expand All @@ -125,11 +125,11 @@ public class Easybase
}
}

public func getMessages(_ table: String = "messages") async -> [Message]
public func getMessages(_ table: String = "messages") async -> [EasyPushMessage]
{
do
{
let messages: [Message] = try await client.from(table).select().execute().value
let messages: [EasyPushMessage] = try await client.from(table).select().execute().value
return messages
}
catch
Expand Down Expand Up @@ -222,7 +222,7 @@ public class Easybase

}

private struct Message: Codable
public struct EasyPushMessage: Codable
{
let id = UUID()
let message: String
Expand Down

0 comments on commit 0396753

Please sign in to comment.