<commit_before>package routes;

import tink.web.routing.*;

using StringTools;

class FriendRoutes {
    public function new() {}

    @:get('/') public function getFriends(user:JWTSession.User):Response {
        var u:models.User = models.User.manager.get(user.id);
        if(u == null) return new response.NotFound();
        var friends:List<models.Friends> = models.Friends.manager.search($friendA == u);
        //Log.trace('${user} requested friends list');
        return new response.API<api.Profiles>(friends);
    }

    @:post('/request') public function requestFriendship(body:{id:String}, user:JWTSession.User):Response {
        var u:models.User = models.User.manager.get(user.id);
        if(u == null) return new response.NotFound();
<commit_msg>Fixed typing in getting friends list in server<commit_after>package routes;

import tink.web.routing.*;

using StringTools;

class FriendRoutes {
    public function new() {}

    @:get('/') public function getFriends(user:JWTSession.User):Response {
        var u:models.User = models.User.manager.get(user.id);
        if(u == null) return new response.NotFound();
        var friends:List<models.Friends> = models.Friends.manager.search($friendA == u);
        //Log.trace('${user} requested friends list');
        return new response.API<api.Profiles>([for(friend in friends) friend.friendB]);
    }

    @:post('/request') public function requestFriendship(body:{id:String}, user:JWTSession.User):Response {
        var u:models.User = models.User.manager.get(user.id);
        if(u == null) return new response.NotFound();

{'fraction_non_alphanumeric': 0.14733542319749215, 'fraction_numerical': 0.0, 'mean_word_length': 3.7218934911242605, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5375459', 'n_tokens_mistral': 471, 'n_tokens_neox': 471, 'n_words': 104}