From ae360114069da9ef567551dede7196d7831049c1 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:31:03 +0300 Subject: backend: importance of || and && --- backend/handlers/record.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend') diff --git a/backend/handlers/record.go b/backend/handlers/record.go index c720823..e43cc61 100644 --- a/backend/handlers/record.go +++ b/backend/handlers/record.go @@ -204,7 +204,7 @@ func CreateRecordWithDemo(c *gin.Context) { // c.JSON(http.StatusOK, models.ErrorResponse(fmt.Sprintf("Partner SteamID from demo and request does not match! Check your submission and try again.\nDemo Partner SteamID: %s\nRequest Partner SteamID: %s", convertedPartnerSteamID, record.PartnerID))) // return // } - if convertedHostSteamID != user.(models.User).SteamID || convertedPartnerSteamID != user.(models.User).SteamID { + if convertedHostSteamID != user.(models.User).SteamID && convertedPartnerSteamID != user.(models.User).SteamID { deleteFile(srv, hostDemoFileID) deleteFile(srv, partnerDemoFileID) c.JSON(http.StatusOK, models.ErrorResponse("You are permitted to only upload your own runs!")) -- cgit v1.2.3 From 51fc58f03b7aa60ae59bfae4c385438425218c92 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:40:30 +0300 Subject: backend: specify 250mb limit --- RULES.md | 1 + backend/main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'backend') diff --git a/RULES.md b/RULES.md index 3645d8f..ffd344d 100644 --- a/RULES.md +++ b/RULES.md @@ -22,6 +22,7 @@ Both `.vtf` and `.vmt` files associated with these textures can be modified. - Proof of your run must be recorded using demos. To start recording, type `record ` when entering the map, or use the SAR plugin with the command `sar_record_at 0`. - A valid demo begins when the player can move and ends when the player touches the end flags. - For cooperative runs, both players must submit their demos. +- For technical reasons, there is a 250 MB limit for demo files. If you have a demo file bigger than 250 MB that you need to submit, please contact an admin in the Discord server. ### Console Commands & Cheats diff --git a/backend/main.go b/backend/main.go index 26aa852..edbe7f8 100644 --- a/backend/main.go +++ b/backend/main.go @@ -47,6 +47,6 @@ func main() { // router.NoRoute(func(c *gin.Context) { // c.File("../frontend/build/index.html") // }) - router.MaxMultipartMemory = 500 << 20 // 500 mb limit for demos + router.MaxMultipartMemory = 250 << 20 // 250 mb limit for demos router.Run(fmt.Sprintf(":%s", os.Getenv("PORT"))) } -- cgit v1.2.3 From dda495de3fd79e4a36713c6012820b7e3394d172 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:38:51 +0300 Subject: docs: point to pektezoldev --- README.md | 2 +- backend/docs/docs.go | 2 +- backend/docs/index.html | 2 +- backend/docs/swagger.json | 2 +- backend/docs/swagger.yaml | 2 +- backend/main.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'backend') diff --git a/README.md b/README.md index 5ff180e..6d1eef5 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ There's also discussion tabs for each map to act like forum pages in order to ta ## Documentation -Full API documentation can be found at https://lp.ardapektezol.com/api/v1/ +Full API documentation can be found at https://lp.pektezol.dev/api/v1/ ## License diff --git a/backend/docs/docs.go b/backend/docs/docs.go index 5327961..71bd68e 100644 --- a/backend/docs/docs.go +++ b/backend/docs/docs.go @@ -2218,7 +2218,7 @@ const docTemplate = `{ // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", - Host: "lp.ardapektezol.com", + Host: "lp.pektezol.dev", BasePath: "/api/v1", Schemes: []string{}, Title: "Least Portals Hub", diff --git a/backend/docs/index.html b/backend/docs/index.html index 8d12274..f2b358d 100644 --- a/backend/docs/index.html +++ b/backend/docs/index.html @@ -17,7 +17,7 @@