Giter Site home page Giter Site logo

website-backend's People

Contributors

aaronjewell avatar abeninski avatar alocate avatar bogdanw3 avatar cepheid-uk avatar cinderjav avatar dependabot-preview[bot] avatar dependabot[bot] avatar fluxxu avatar gabcinder2004 avatar gabrieln-ukg avatar godrien avatar gustav87 avatar healfy avatar helpstonex avatar jensk1 avatar jj-apps avatar jt-graves avatar kato88 avatar knumf avatar modmoto avatar mourasman avatar playlikeneverb4 avatar psperber avatar raswanson01 avatar sergeykhval avatar shadefade avatar uladzim1r avatar weidenbach avatar wkozuch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website-backend's Issues

"gateWay" from the api/players/global-search endpoint

Hi,

Can you please include the "gateWay" (player region) in the results returned from the api/players/global-search endpoint?
I need this for the opensource w3c discord bot i started developing recently.
I am implementing a search which will list the players from the search results in a MenuSelect (a dropdown like object in discord messages), where users can select the player from the search results. But without having the region, users will have to provide the region themselves (which is not convenient at all). IMO, for all intents and purposes the gateWay (region) should be returned as well.

Bonus request: Include the 1vs1 mmr as well (reason is, people may be able to find the player they are searching for by the mmr), country, main race, etc.

It would be nice to update the frontend to include the region (maybe the mmr as well) on the front-end search results, but my feature request for this is purely backend.

Thank you!

AT games show up as RT games in match history

Starting from 28 of september (season 3) all AT games show up as RT.

Here are the last AT games of shocker for season 3 (NOTICE that he plays with RTGOD ~2200 mmr!)
grafik

Then, after 28 of september the games with RTGOD show up in normal 2vs2 (RT)
grafik

For season 4, no AT games are listed at all
grafik

It seems like also here the AT games are still listed under RT:
grafik

Another example of blank 2v2 AT match history:
grafik

Another example of 28 of september being last day AT matches are actually listed under 2vs2 AT:
grafik

grafik

https://www.w3champions.com/player/CRODeny%232741/matches
https://www.w3champions.com/player/Shocker%2321685/matches

This issue seems to be backend related, as the data is visualized correctly in the UI.

Clans: Creating a clan with the non-unique name should not be possible

I think there is a bug in public async Task<bool> TryInsertClan(Clan clan)
There should be also a check if clan can be found by name.

Potential solution:

        public async Task<bool> TryInsertClan(Clan clan)
        {
            var clanFoundById = await LoadFirst<Clan>(c => c.ClanId == clan.ClanId);
            var clanFoundByName = await LoadFirst<Clan>(c => c.ClanName == clan.ClanName);
            if (clanFoundById != null || clanFoundByName != null) return false;
            await Insert(clan);
            return true;
        }

Autumn Leaves player stats are not being correctly transferred in API requests to 'race-on-map-versus-race'

Did a preliminary investigation:

  • the stats for AL are correctly logging in the database
    correctindb

  • the frontend is displaying all the data it's receiving correctly
    frontend

  • the frontend is only receiving the first 10 maps of data in the database, and not receving number 11 ('autumnleaves201016')

  • checked the API from the stats service independently, and it's not passing the autumnleaves201016 games from the backend:
    stats service

Problem is in the backend it would seem.

Originally posted by @Cepheid-UK in w3champions/website#301 (comment)

I want some way to find finished match after ongoing.

Based on #37

Situation: I track some interesting for me ongoing match and when it's over I want to check it's result.

Currently I can grab all finished matches and find match which has started in same time, having same players, was played one same map, that's not very handy solution.
Ideally I need some GET route where I can use some id provided by ongoing match find finished match. I'm not able to run tests for C# applications because of religion so can't contribute that change.

Implementing the "expected winrate" formula and the corresponding aggregated stats

The goal is to be able to produce the same "expected winrate" statistic derived as modelled by the glicko2 rating system.

See: https://warcraft3.info/articles/359 for an introduction. I am not talking about fitting the bias parameter over the dataset.

Ideally, anywhere there is an "actual winrate", there should be an "expected winrate" equivalent.

For example:
-https://www.w3champions.com/OverallStatistics/winrates-per-race-and-map
-https://www.w3champions.com/OverallStatistics/heroes-winrates
-players' profiles so we can show the best and worst matchups based on that!

This would, later on, involve frontend work (by someone else most likely).

Contact Toxi for exact formula.

Code review: suspicious place in MatchesController.cs

Hi guys.

I was reviewing project's code and found some supsicious place in MatchesController.cs:

image

Seems that FFA match will never get to PlayersObfuscator.ObfuscatePlayersForFFA. I would rewrite it something like:

[HttpGet("ongoing/{playerId}")]
public async Task<IActionResult> GetOnGoingMatches(string playerId)
{
    var onGoingMatch = await _matchRepository.TryLoadOnGoingMatchForPlayer(playerId);

    if (onGoingMatch == null)
        return Ok(null);

    if (onGoingMatch.GameMode == GameMode.FFA)
        PlayersObfuscator.ObfuscatePlayersForFFA(onGoingMatch);

    return Ok(onGoingMatch);
}

If you don't mind I'll do PR.

Move ongoing matches to in memory static list

Ongoing matches seem to be hitting db pretty hard. I think we can easily move them to in memory static list and not use mongo at all. The only downside to that would be that deploying statistics backend will clear them but I think this is not a big deal as they are pretty volatile anyway.

Handle MatchCancelled and revert all data for that match

We need a way to cancel a match because sometimes a bug happens and wrong result is recorded.
There is already MatchCancelledEvent which we need to handle and revert all data that the MatchFinishedEvent added.

You need to make sure that MatchFinishedEvent has already happened because in some cases MatchCancelledEvent can be fired without MatchFinishedEvent.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.