add more accessor methods

This commit is contained in:
Michael Fatemi 2021-04-10 11:34:21 -04:00
parent 142c1c7dd6
commit 89c1742515

View File

@ -44,3 +44,15 @@ export function getPostsByUser(userID: string) {
return postIDs; return postIDs;
} }
export function getUserByID(userID: string): Carpool.User | undefined {
return users[userID];
}
export function getPostByID(postID: string): Carpool.Post | undefined {
return posts[postID];
}
export function getGroupByID(groupID: string): Carpool.Group | undefined {
return groups[groupID];
}