mirror of
https://github.com/CannedNet/CannedNet.git
synced 2026-10-27 16:09:03 -07:00
we're closeeeerrrrr
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"Hosting": {
|
||||||
|
"Url": "http://*:5009"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"AccountId": 1,
|
||||||
|
"Noteriety": 0,
|
||||||
|
"CheerGeneral": 0,
|
||||||
|
"CheerHelpful": 0,
|
||||||
|
"CheerCreative": 0,
|
||||||
|
"CheerGreatHost": 0,
|
||||||
|
"CheerSportsman": 0,
|
||||||
|
"CheerCredit": 20,
|
||||||
|
"SelectedCheer": null
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
},
|
},
|
||||||
"InstagramImages": [
|
"InstagramImages": [
|
||||||
{
|
{
|
||||||
"ImageName": "bfv2n2pm1qck4rba5j8qbrvgrbhlgu.jpg",
|
"ImageName": "gay.png",
|
||||||
"ImageUrl": "https://epicquest.live/photo/152846"
|
"ImageUrl": "https://epicquest.live/photo/152846"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -26,21 +26,21 @@
|
|||||||
"BlobName": "facq8grasrhep777er7bhxjz0.mp4",
|
"BlobName": "facq8grasrhep777er7bhxjz0.mp4",
|
||||||
"Title": "AbyssalFrostTrailer",
|
"Title": "AbyssalFrostTrailer",
|
||||||
"Description": "AbyssalFrost\\nBy\\n@Snox\\n@Rick\\n@Jessica\\n@Fandorn",
|
"Description": "AbyssalFrost\\nBy\\n@Snox\\n@Rick\\n@Jessica\\n@Fandorn",
|
||||||
"ThumbnailBlobName": "kk2abhn2pb699uld3ygbqnznj.jpg",
|
"ThumbnailBlobName": "gay.png",
|
||||||
"SourceUrl": "https://www.youtube.com/watch?v=-eUGRKyYA0w"
|
"SourceUrl": "https://www.youtube.com/watch?v=-eUGRKyYA0w"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"BlobName": "nan5xp4xmqu5izjdxoc7tq9h1.mp4",
|
"BlobName": "nan5xp4xmqu5izjdxoc7tq9h1.mp4",
|
||||||
"Title": "How To Get Items & XP in Radium! [5-Stars] [Tokens] [XP]",
|
"Title": "How To Get Items & XP in Radium! [5-Stars] [Tokens] [XP]",
|
||||||
"Description": "Today ill be teaching the Radium Players on how to get xp and cool items using basic in game rooms. Feel free to look at my other links below.\n\nguns.lol/cge\nhaunt.gg/or\nhaunt.gg/gr\nrec.net/user/rud\nepicquest.live/user/skid",
|
"Description": "Today ill be teaching the Radium Players on how to get xp and cool items using basic in game rooms. Feel free to look at my other links below.\n\nguns.lol/cge\nhaunt.gg/or\nhaunt.gg/gr\nrec.net/user/rud\nepicquest.live/user/skid",
|
||||||
"ThumbnailBlobName": "16y6ak5kyc048ooy6bm5ergqg.png",
|
"ThumbnailBlobName": "gay.png",
|
||||||
"SourceUrl": "https://www.youtube.com/watch?v=emiEDPz4Va4"
|
"SourceUrl": "https://www.youtube.com/watch?v=emiEDPz4Va4"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"BlobName": "iy3n1k9am3zc87j0mgei6831u.mp4",
|
"BlobName": "iy3n1k9am3zc87j0mgei6831u.mp4",
|
||||||
"Title": "Extreme quest Recap | Radium",
|
"Title": "Extreme quest Recap | Radium",
|
||||||
"Description": "I tried more extreme quets, are they as hard as they look? find out!\n\nthumbnail maker: @ThatFellaRR\n\nRadium is a 2021 build of rec room which is community hosted. This is in no way meant to create any revenue.\nto learn more join discord.gg/Radium-rr/\nalso check out speedrun.com/radium_",
|
"Description": "I tried more extreme quets, are they as hard as they look? find out!\n\nthumbnail maker: @ThatFellaRR\n\nRadium is a 2021 build of rec room which is community hosted. This is in no way meant to create any revenue.\nto learn more join discord.gg/Radium-rr/\nalso check out speedrun.com/radium_",
|
||||||
"ThumbnailBlobName": "fgfe5mrki1hbxbwsu09n028px.png",
|
"ThumbnailBlobName": "gay.png",
|
||||||
"SourceUrl": "https://www.youtube.com/watch?v=zQZ0idzAIrA"
|
"SourceUrl": "https://www.youtube.com/watch?v=zQZ0idzAIrA"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
"hi :3"
|
"h"
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"Accounts": "http://localhost:5005",
|
"Accounts": "http://localhost:5005",
|
||||||
"Link": "https://link.lapis.codes",
|
"Link": "https://link.lapis.codes",
|
||||||
"RoomComments": "https://roomcomments.lapis.codes",
|
"RoomComments": "https://roomcomments.lapis.codes",
|
||||||
"Clubs": "https://clubs.lapis.codes",
|
"Clubs": "http://localhost:5009",
|
||||||
"Rooms": "https://rooms.lapis.codes",
|
"Rooms": "https://rooms.lapis.codes",
|
||||||
"PlatformNotifications": "https://api.lapis.codes",
|
"PlatformNotifications": "https://api.lapis.codes",
|
||||||
"Moderation": "https://api.lapis.codes",
|
"Moderation": "https://api.lapis.codes",
|
||||||
|
|||||||
@@ -137,7 +137,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "splitTestHardOverrides",
|
"Key": "splitTestHardOverrides",
|
||||||
"Value": "GottaGoFastNUX_2020_09_04=Off;PlayMenuRRUI_2021_01_11=Off;RoomRecommendations_2020_05_06=On;"
|
"Value": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "splitTestSegmentProbabilities",
|
"Key": "splitTestSegmentProbabilities",
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "splitTestSoftOverrides",
|
"Key": "splitTestSoftOverrides",
|
||||||
"Value": "FentReactorDebugGuiEnabled_2025_11_20=DeveloperOnly;"
|
"Value": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Key": "SynchronizedField.RemoveDefaultEntries",
|
"Key": "SynchronizedField.RemoveDefaultEntries",
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"playerId": 1,
|
||||||
|
"statusVisibility": 0,
|
||||||
|
"deviceClass": 0,
|
||||||
|
"vrMovementMode": 1,
|
||||||
|
"roomInstance": null,
|
||||||
|
"isOnline": true,
|
||||||
|
"appVersion": "20210129",
|
||||||
|
"platform": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -1,79 +1,79 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "DormRoomBucket",
|
"FriendlyImageName": "DormRoomBucket",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-10-02T00:00:00",
|
"StartTime": "2025-10-02T00:00:00",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "Loft",
|
"FriendlyImageName": "Loft",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-09-29T00:00:00",
|
"StartTime": "2025-09-29T00:00:00",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "StairsLeft",
|
"FriendlyImageName": "StairsLeft",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-09-29T00:00:00",
|
"StartTime": "2025-09-29T00:00:00",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "TheaterWall",
|
"FriendlyImageName": "TheaterWall",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-09-29T00:00:00",
|
"StartTime": "2025-09-29T00:00:00",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "CreativePuzzles",
|
"FriendlyImageName": "CreativePuzzles",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-09-29T00:00:00",
|
"StartTime": "2025-09-29T00:00:00",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "PVPwall",
|
"FriendlyImageName": "PVPwall",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-09-29T00:00:00",
|
"StartTime": "2025-09-29T00:00:00",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "GymWall",
|
"FriendlyImageName": "GymWall",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-09-29T00:00:00",
|
"StartTime": "2025-09-29T00:00:00",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "Cafe",
|
"FriendlyImageName": "Cafe",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-09-29T00:00:00",
|
"StartTime": "2025-09-29T00:00:00",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "LoungeMain",
|
"FriendlyImageName": "LoungeMain",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-11-16T07:44:44",
|
"StartTime": "2025-11-16T07:44:44",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "LoungeDoorRight",
|
"FriendlyImageName": "LoungeDoorRight",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-11-16T07:44:44",
|
"StartTime": "2025-11-16T07:44:44",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "DormRoomHallRight",
|
"FriendlyImageName": "DormRoomHallRight",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-11-16T07:44:44",
|
"StartTime": "2025-11-16T07:44:44",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "LoftTrashCan",
|
"FriendlyImageName": "LoftTrashCan",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-11-16T07:44:44",
|
"StartTime": "2025-11-16T07:44:44",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"FriendlyImageName": "FeaturedLoft",
|
"FriendlyImageName": "FeaturedLoft",
|
||||||
"ImageName": "qauuenm1foron0kntcwbilz7i.png",
|
"ImageName": "gay.png",
|
||||||
"StartTime": "2025-11-16T07:44:44",
|
"StartTime": "2025-11-16T07:44:44",
|
||||||
"EndTime": "2029-09-09T00:00:00"
|
"EndTime": "2029-09-09T00:00:00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
{
|
{
|
||||||
"RealtimeAppId": "038c1828-7979-4735-8d30-50c3276c30a7",
|
"RealtimeAppId": "c74d22b7-6665-41cf-9ce8-fc70b625caa6",
|
||||||
"VoiceAppId": "f6a30374-c1ce-4ea5-8919-45bc29203bc9",
|
"VoiceAppId": "f7adbf03-edae-4a7d-bb4b-9e06de75bd96",
|
||||||
"ChatAppId": "f6a30374-c1ce-4ea5-8919-45bc29203bc9",
|
"ChatAppId": "4538ca46-903b-48d9-bf33-247ea468a29d",
|
||||||
"HostingOption": 1,
|
"HostingOption": 1,
|
||||||
"Protocol": 0,
|
"Protocol": 0,
|
||||||
"ServerAddress": "127.0.0.1",
|
"FixedRegion": "us"
|
||||||
"ServerPort": -1,
|
|
||||||
"VoiceServerPort": -1,
|
|
||||||
"ChatServerPort": -1,
|
|
||||||
"NetworkLogging": 0,
|
|
||||||
"PunLogging": 0
|
|
||||||
}
|
}
|
||||||
@@ -8,8 +8,8 @@ public class PlayerSetting
|
|||||||
[JsonPropertyName("playerId")]
|
[JsonPropertyName("playerId")]
|
||||||
public int PlayerId { get; set; }
|
public int PlayerId { get; set; }
|
||||||
[JsonPropertyName("key")]
|
[JsonPropertyName("key")]
|
||||||
public string Key { get; set; }
|
public string Key { get; set; } = "";
|
||||||
[JsonPropertyName("value")]
|
[JsonPropertyName("value")]
|
||||||
public string Value { get; set; }
|
public string Value { get; set; } = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using CannedNet;
|
using CannedNet;
|
||||||
using CannedNet.Data;
|
using CannedNet.Data;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace CannedNet.Services;
|
namespace CannedNet.Services;
|
||||||
|
|
||||||
@@ -35,7 +37,7 @@ public class APIService
|
|||||||
|
|
||||||
app.MapPost("/api/playerReputation/v1/bulk", async (HttpRequest httpRequest, AppDbContext db) =>
|
app.MapPost("/api/playerReputation/v1/bulk", async (HttpRequest httpRequest, AppDbContext db) =>
|
||||||
{
|
{
|
||||||
var ids = await ParseFormIds(httpRequest);
|
/*var ids = await ParseFormIds(httpRequest);
|
||||||
|
|
||||||
if (!ids.Any())
|
if (!ids.Any())
|
||||||
return Results.Json(new List<object>());
|
return Results.Json(new List<object>());
|
||||||
@@ -53,7 +55,11 @@ public class APIService
|
|||||||
SelectedCheer = (object?)null
|
SelectedCheer = (object?)null
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
return Results.Json(reputations);
|
return Results.Json(reputations);*/
|
||||||
|
|
||||||
|
// TODO: implement real endpoint from grabbing from db
|
||||||
|
var json = File.ReadAllText("JSON/bulkprogression.json");
|
||||||
|
return Results.Content(json, "application/json");
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapPost("/api/players/v1/progression/bulk", async (HttpRequest httpRequest, AppDbContext db) =>
|
app.MapPost("/api/players/v1/progression/bulk", async (HttpRequest httpRequest, AppDbContext db) =>
|
||||||
@@ -142,7 +148,13 @@ public class APIService
|
|||||||
await db.SaveChangesAsync();
|
await db.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Results.Json(avatar);
|
return Results.Json(new
|
||||||
|
{
|
||||||
|
OutfitSelections = avatar.OutfitSelections,
|
||||||
|
FaceFeatures = avatar.FaceFeatures,
|
||||||
|
SkinColor = avatar.SkinColor,
|
||||||
|
HairColor = avatar.HairColor
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapPost("/api/avatar/v2/set", async (HttpRequest request, AppDbContext db) =>
|
app.MapPost("/api/avatar/v2/set", async (HttpRequest request, AppDbContext db) =>
|
||||||
@@ -239,6 +251,47 @@ public class APIService
|
|||||||
var settings = await db.PlayerSettings
|
var settings = await db.PlayerSettings
|
||||||
.Where(s => s.PlayerId == id)
|
.Where(s => s.PlayerId == id)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
if (!settings.Any())
|
||||||
|
{
|
||||||
|
var defaults = new List<PlayerSetting>
|
||||||
|
{
|
||||||
|
new() { PlayerId = id, Key = "Recroom.OOBE", Value = "77" },
|
||||||
|
new() { PlayerId = id, Key = "SplitTestAssignedSegments", Value = "1|{\"SplitTesting+PhotonMaxDatagrams_2021_01_11\":\"Off\",\"SplitTesting+Curated_Rooms_2020_08_06\":\"Off\",\"SplitTesting+RoomRecommendationsType_2020_08_14\":\"Aug14MinVisitors35000\"}" },
|
||||||
|
new() { PlayerId = id, Key = "PlayerSessionCount", Value = "13" },
|
||||||
|
new() { PlayerId = id, Key = "TUTORIAL_COMPLETE_MASK", Value = "11" },
|
||||||
|
new() { PlayerId = id, Key = "BACKPACK_FAVORITE_TOOL", Value = "1" },
|
||||||
|
new() { PlayerId = id, Key = "VoiceChat", Value = "2" },
|
||||||
|
new() { PlayerId = id, Key = "VRAUTOSPRINT", Value = "1" },
|
||||||
|
new() { PlayerId = id, Key = "VR_MOVEMENT_MODE", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "COMFORT_SPRINT", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "COMFORT_WALK", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "COMFORT_VEHICLES", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "COMFORT_FLY", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "COMFORT_ROTATE", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "COMFORT_FORCES", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "COMFORT_FALL", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "COMFORT_TELEPORT", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "ROTATE_IN_PLACE_ENABLED", Value = "1" },
|
||||||
|
new() { PlayerId = id, Key = "ROTATION_INCREMENT", Value = "2" },
|
||||||
|
new() { PlayerId = id, Key = "CONTINUOUS_ROTATION_MODE", Value = "1" },
|
||||||
|
new() { PlayerId = id, Key = "DONT_LOCK_TOOLS_TO_HAND", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "QualitySettings", Value = "2" },
|
||||||
|
new() { PlayerId = id, Key = "TeleportBuffer", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "IgnoreBuffer", Value = "1" },
|
||||||
|
new() { PlayerId = id, Key = "FIRST_TIME_IN_FLAGS", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "ShowRoomCenter", Value = "1" },
|
||||||
|
new() { PlayerId = id, Key = "USER_TRACKING", Value = "1" },
|
||||||
|
new() { PlayerId = id, Key = "STABILIZE_HANDS", Value = "0" },
|
||||||
|
new() { PlayerId = id, Key = "MakerPen_SnappingMode", Value = "2" },
|
||||||
|
new() { PlayerId = id, Key = "Recroom.ChallengeMap", Value = "17" },
|
||||||
|
new() { PlayerId = id, Key = "VoiceFilter2", Value = "1" },
|
||||||
|
new() { PlayerId = id, Key = "SFX_VOLUME_PERCENT_PREF", Value = "1" },
|
||||||
|
};
|
||||||
|
db.PlayerSettings.AddRange(defaults);
|
||||||
|
await db.SaveChangesAsync();
|
||||||
|
settings = defaults;
|
||||||
|
}
|
||||||
|
|
||||||
return Results.Json(settings);
|
return Results.Json(settings);
|
||||||
});
|
});
|
||||||
@@ -264,6 +317,8 @@ public class APIService
|
|||||||
using var reader = new StreamReader(request.Body);
|
using var reader = new StreamReader(request.Body);
|
||||||
var body = await reader.ReadToEndAsync();
|
var body = await reader.ReadToEndAsync();
|
||||||
|
|
||||||
|
Console.WriteLine($"Settings request body: {body}");
|
||||||
|
|
||||||
var settings = new List<PlayerSetting>();
|
var settings = new List<PlayerSetting>();
|
||||||
|
|
||||||
if (body.TrimStart().StartsWith("["))
|
if (body.TrimStart().StartsWith("["))
|
||||||
@@ -374,8 +429,8 @@ public class APIService
|
|||||||
app.MapGet("/api/challenge/v2/getCurrent", async (HttpRequest request, AppDbContext db) =>
|
app.MapGet("/api/challenge/v2/getCurrent", async (HttpRequest request, AppDbContext db) =>
|
||||||
{
|
{
|
||||||
var json = File.ReadAllText("JSON/weeklychallenge.json");
|
var json = File.ReadAllText("JSON/weeklychallenge.json");
|
||||||
//return Results.Content(json, "application/json");
|
return Results.Content(json, "application/json");
|
||||||
return "{}";
|
//return "{}";
|
||||||
});
|
});
|
||||||
app.MapGet("/roomserver/rooms/createdby/me", async (HttpRequest request, AppDbContext db) =>
|
app.MapGet("/roomserver/rooms/createdby/me", async (HttpRequest request, AppDbContext db) =>
|
||||||
{
|
{
|
||||||
@@ -385,9 +440,20 @@ public class APIService
|
|||||||
});
|
});
|
||||||
app.MapGet("/roomserver/rooms/{id}", async (HttpRequest request, AppDbContext db, string id) =>
|
app.MapGet("/roomserver/rooms/{id}", async (HttpRequest request, AppDbContext db, string id) =>
|
||||||
{
|
{
|
||||||
// TODO ADD FUNCTIONALITY
|
|
||||||
var json = File.ReadAllText("JSON/ownedrooms.json");
|
var json = File.ReadAllText("JSON/ownedrooms.json");
|
||||||
return Results.Content(json, "application/json");
|
using var doc = System.Text.Json.JsonDocument.Parse(json);
|
||||||
|
var root = doc.RootElement;
|
||||||
|
if (root.ValueKind == JsonValueKind.Array)
|
||||||
|
{
|
||||||
|
foreach (var room in root.EnumerateArray())
|
||||||
|
{
|
||||||
|
if (room.TryGetProperty("RoomId", out var roomIdProp) && roomIdProp.TryGetInt32(out var roomId) && roomId.ToString() == id)
|
||||||
|
{
|
||||||
|
return Results.Content(room.GetRawText(), "application/json");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Results.NotFound();
|
||||||
});
|
});
|
||||||
app.MapGet("/api/images/v2/named", async (HttpRequest request, AppDbContext db) =>
|
app.MapGet("/api/images/v2/named", async (HttpRequest request, AppDbContext db) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,6 +78,29 @@ public class AccountsService
|
|||||||
return Results.Json(accounts);
|
return Results.Json(accounts);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.MapGet("/account/{id}", (HttpRequest request, string id) =>
|
||||||
|
{
|
||||||
|
var accounts = new Account();
|
||||||
|
|
||||||
|
if (int.TryParse(id, out var accountId))
|
||||||
|
{
|
||||||
|
accounts = new Account
|
||||||
|
{
|
||||||
|
AccountId = accountId,
|
||||||
|
ProfileImage = "hdqeamlcmatc6qzoi2ybgf0ddijjcf.jpg",
|
||||||
|
IsJunior = false,
|
||||||
|
Platforms = 0,
|
||||||
|
PersonalPronouns = 0,
|
||||||
|
IdentityFlags = 0,
|
||||||
|
Username = $"Player{accountId}",
|
||||||
|
DisplayName = $"Player{accountId}",
|
||||||
|
CreatedAt = DateTime.UtcNow
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return Results.Json(accounts);
|
||||||
|
});
|
||||||
|
|
||||||
app.MapPost("/account/create", async (HttpRequest httpRequest, AppDbContext db) =>
|
app.MapPost("/account/create", async (HttpRequest httpRequest, AppDbContext db) =>
|
||||||
{
|
{
|
||||||
int platform = 0;
|
int platform = 0;
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
namespace CannedNet.Services;
|
||||||
|
|
||||||
|
public class ClubsService
|
||||||
|
{
|
||||||
|
public WebApplicationBuilder Initialize(string[]? args = null) => ServiceExtensions.CreateRecNetBuilder(args);
|
||||||
|
|
||||||
|
public void MapEndpoints(WebApplication app)
|
||||||
|
{
|
||||||
|
app.MapGet("/club/home/me", () =>
|
||||||
|
{
|
||||||
|
return Results.NotFound();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@ public class MatchmakingService
|
|||||||
|
|
||||||
app.MapGet("/player", (HttpRequest request) =>
|
app.MapGet("/player", (HttpRequest request) =>
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
var id = request.Query["id"];
|
var id = request.Query["id"];
|
||||||
var accounts = new List<Account>();
|
var accounts = new List<Account>();
|
||||||
|
|
||||||
@@ -33,7 +34,10 @@ public class MatchmakingService
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return Results.Json(accounts);
|
return Results.Json(accounts);*/
|
||||||
|
|
||||||
|
var json = File.ReadAllText("JSON/getplayer.json");
|
||||||
|
return Results.Content(json, "application/json");
|
||||||
});
|
});
|
||||||
|
|
||||||
app.MapPost("/goto/room/{room}", (HttpRequest request, string room) =>
|
app.MapPost("/goto/room/{room}", (HttpRequest request, string room) =>
|
||||||
@@ -53,6 +57,7 @@ public class MatchmakingService
|
|||||||
dataBlob = "",
|
dataBlob = "",
|
||||||
eventId = 0,
|
eventId = 0,
|
||||||
clubId = 0,
|
clubId = 0,
|
||||||
|
roomCode = "",
|
||||||
photonRegionId = "us",
|
photonRegionId = "us",
|
||||||
photonRoomId = Guid.NewGuid(),
|
photonRoomId = Guid.NewGuid(),
|
||||||
name = room,
|
name = room,
|
||||||
@@ -64,6 +69,35 @@ public class MatchmakingService
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.MapPost("/goto/none", (HttpRequest request) =>
|
||||||
|
{
|
||||||
|
// dormroom location id : 76d98498-60a1-430c-ab76-b54a29b7a163
|
||||||
|
|
||||||
|
return Results.Json(new
|
||||||
|
{
|
||||||
|
errorCode = 0,
|
||||||
|
roomInstance = new
|
||||||
|
{
|
||||||
|
roomInstanceId = 1,
|
||||||
|
roomId = 1,
|
||||||
|
subRoomId = 1,
|
||||||
|
roomInstanceType = 2,
|
||||||
|
location = "76d98498-60a1-430c-ab76-b54a29b7a163",
|
||||||
|
dataBlob = "",
|
||||||
|
eventId = 0,
|
||||||
|
clubId = 0,
|
||||||
|
photonRegionId = "us",
|
||||||
|
photonRoomId = Guid.NewGuid(),
|
||||||
|
name = "DormRoom",
|
||||||
|
maxCapacity = 4,
|
||||||
|
isFull = false,
|
||||||
|
isPrivate = true,
|
||||||
|
isInProgress = false,
|
||||||
|
EncryptVoiceChat = false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
app.MapPost("/player/heartbeat", async (HttpRequest request) =>
|
app.MapPost("/player/heartbeat", async (HttpRequest request) =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public static class Services
|
|||||||
new() { Name = "Accounts", Port = 5005, ServiceType = typeof(AccountsService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, jwt) => new AccountsService().MapEndpoints(app, jwt) },
|
new() { Name = "Accounts", Port = 5005, ServiceType = typeof(AccountsService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, jwt) => new AccountsService().MapEndpoints(app, jwt) },
|
||||||
new() { Name = "Notify", Port = 5006, ServiceType = typeof(NotifyService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new NotifyService().MapEndpoints(app) },
|
new() { Name = "Notify", Port = 5006, ServiceType = typeof(NotifyService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new NotifyService().MapEndpoints(app) },
|
||||||
new() { Name = "CDN", Port = 5007, ServiceType = typeof(CDNService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new CDNService().MapEndpoints(app) },
|
new() { Name = "CDN", Port = 5007, ServiceType = typeof(CDNService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new CDNService().MapEndpoints(app) },
|
||||||
new() { Name = "Image", Port = 5008, ServiceType = typeof(ImageService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new ImageService().MapEndpoints(app) }
|
new() { Name = "Image", Port = 5008, ServiceType = typeof(ImageService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new ImageService().MapEndpoints(app) },
|
||||||
|
new() { Name = "Clubs", Port = 5009, ServiceType = typeof(ClubsService), ConfigureBuilder = b => b.ConfigureRecNetServices(), MapEndpoints = (app, _) => new ClubsService().MapEndpoints(app) }
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user