-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Changed nginx routing config * removed download from API * fixed api limit tests * [CreateAccount] added recaptcha * Added captcha to download action * added new api_usage info * [ApiUsage] checking login_attempts * added dt user tag to test * fixed salt key * added logging * recaptcha callbacks * removed invisible captcha * removed invisible captcha
- Loading branch information
1 parent
9125bda
commit 5832c64
Showing
38 changed files
with
521 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,8 +181,8 @@ def fill_db(test_db, metadata, ds_config): | |
[(1, 'regular', datetime.now(), True)], | ||
) | ||
db.insert( | ||
"INSERT INTO graphql.user (id, name, email, plan_id) VALUES (%s, %s, %s, %s)", | ||
rows=[(user_id, 'name', '[email protected]', 1)], | ||
"INSERT INTO graphql.user (id, name, email, plan_id, created_at, updated_at) VALUES (%s, %s, %s, %s, %s, %s)", | ||
rows=[(user_id, 'name', '[email protected]', 1, datetime.now(), datetime.now())], | ||
) | ||
group_id = str(uuid.uuid4()) | ||
db.insert( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,8 @@ def fill_db(test_db): | |
[(1, 'regular', datetime.now(), True)], | ||
) | ||
db.insert( | ||
'INSERT INTO graphql.user (id, name, email, plan_id) VALUES (%s, %s, %s, %s)', | ||
[(USER_ID, 'name', '[email protected]', 1)], | ||
'INSERT INTO graphql.user (id, name, email, plan_id, created_at, updated_at) VALUES (%s, %s, %s, %s, %s, %s)', | ||
[(USER_ID, 'name', '[email protected]', 1, datetime.now(), datetime.now())], | ||
) | ||
db.insert( | ||
'INSERT INTO graphql.group (id, name, short_name) VALUES (%s, %s, %s)', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
metaspace/graphql/src/migrations/1733515541205-ApiUsageExtraInfo.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class ApiUsageExtraInfo1733515541205 implements MigrationInterface { | ||
name = 'ApiUsageExtraInfo1733515541205' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
// Add columns to the "user" table | ||
await queryRunner.query(`ALTER TABLE "graphql"."user" ADD "created_at" TIMESTAMP DEFAULT NOW()`); | ||
await queryRunner.query(`ALTER TABLE "graphql"."user" ADD "updated_at" TIMESTAMP DEFAULT NOW()`); | ||
|
||
// Add columns to the "api_usage" table | ||
await queryRunner.query(`ALTER TABLE "public"."api_usage" ADD "ip_hash" TEXT`); | ||
await queryRunner.query(`ALTER TABLE "public"."api_usage" ADD "device_info" json`); | ||
|
||
// Add indexes to the "api_usage" table | ||
await queryRunner.query(`CREATE INDEX "IDX_api_usage_ip_hash" ON "public"."api_usage" ("ip_hash")`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
// Drop indexes from the "api_usage" table | ||
await queryRunner.query(`DROP INDEX "public"."IDX_api_usage_ip_hash"`); | ||
|
||
// Remove columns from the "api_usage" table | ||
await queryRunner.query(`ALTER TABLE "public"."api_usage" DROP COLUMN "device_info"`); | ||
await queryRunner.query(`ALTER TABLE "public"."api_usage" DROP COLUMN "ip_hash"`); | ||
|
||
// Remove columns from the "user" table | ||
await queryRunner.query(`ALTER TABLE "graphql"."user" DROP COLUMN "updated_at"`); | ||
await queryRunner.query(`ALTER TABLE "graphql"."user" DROP COLUMN "created_at"`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.