Upload files to "routes/API"
This commit is contained in:
29
routes/API/PlayerReputation.cs
Normal file
29
routes/API/PlayerReputation.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using MongoDB.Driver;
|
||||
using Stella.Models;
|
||||
|
||||
namespace Stella.Routes.API
|
||||
{
|
||||
public class GetPlayerReputation
|
||||
{
|
||||
[ServerAPI.GET("/api/playerReputation/v1/{accountId}")]
|
||||
public ReputationDTO ReturnGetPlayerReputation(int accountId)
|
||||
{
|
||||
MongoDB.User user = MongoDB.usersCollection.Find(u => u.AccountId == accountId).FirstOrDefault();
|
||||
|
||||
return new ReputationDTO
|
||||
{
|
||||
AccountId = accountId,
|
||||
Noteriety = 0,
|
||||
CheerGeneral = 0,
|
||||
CheerHelpful = 1,
|
||||
CheerGreatHost = 1,
|
||||
CheerSportsman = 1,
|
||||
CheerCreative = 1,
|
||||
CheerCredit = 0,
|
||||
SubscriberCount = 0,
|
||||
SubscribedCount = 0,
|
||||
SelectedCheer = CheerCategory.General
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user