1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-27 07:49:22 +00:00
comunicapiv2/src/controllers/FriendsController.ts

24 lines
422 B
TypeScript
Raw Normal View History

2019-12-28 15:52:52 +00:00
import { Friend } from "../entities/Friend";
/**
* Friends controller
*
* @author Pierre HUBERT
*/
export class FriendsController {
/**
* Turn a friend object into an API entry
*
* @param friend Friend object to transform
*/
public static FriendToAPI(friend: Friend) : any {
return {
ID_friend: friend.friendID,
accepted: friend.accepted,
time_last_activity: friend.lastActivityTime
}
}
}