mirror of
https://github.com/myfatemi04/wheelshare-old-backend.git
synced 2025-04-21 12:10:17 -04:00
add more accessor methods
This commit is contained in:
parent
142c1c7dd6
commit
89c1742515
12
src/data.ts
12
src/data.ts
|
@ -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];
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user