Skip to content

Commit

Permalink
paginated: Mark all the values public.
Browse files Browse the repository at this point in the history
Closes #8
  • Loading branch information
anthonycastelli committed May 29, 2018
1 parent a9edc17 commit 4d19824
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions Sources/Pagination/Paginated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ import Fluent
import Vapor

public struct Position: Content {
var current: Int
var next: Int?
var previous: Int?
var max: Int
public var current: Int
public var next: Int?
public var previous: Int?
public var max: Int
}
public struct PageData: Content {
var per: Int
var total: Int
public var per: Int
public var total: Int
}
public struct PageInfo: Content {
var position: Position
var data: PageData
public var position: Position
public var data: PageData
}
public struct Paginated<M: Content>: Content {
var page: PageInfo
var data: [M]
public var page: PageInfo
public var data: [M]
}

extension Page where M: Content {
Expand All @@ -45,7 +45,6 @@ extension Page where M: Content {
position: position,
data: pageData
)

return Paginated(
page: pageInfo,
data: self.data
Expand Down

0 comments on commit 4d19824

Please sign in to comment.