Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Simple, empty initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
mludi committed Apr 16, 2017
1 parent c8df9bd commit e24a784
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Sources/VaporGCM/GCMPayload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import JSON

///Parameters for gcmPayload messaging by platform
public struct GCMPayload {
// Simple, empty initializer
public init() {}
//Indicates notification title. This field is not visible on iOS phones and tablets.
public var title: String?
//Indicates notification body text.
Expand Down Expand Up @@ -70,3 +72,16 @@ public struct GCMPayload {
return json
}
}

public extension GCMPayload {
public init(message: String) {
self.init()
self.body = message
}

public init(title: String, body: String) {
self.init()
self.title = title
self.body = body
}
}

0 comments on commit e24a784

Please sign in to comment.