Skip to content

Commit af823c8

Browse files
committed
Merge branch 'main' into pr/rudransh-shrivastava/2223
2 parents 34b0090 + a4254f7 commit af823c8

File tree

85 files changed

+1727
-763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1727
-763
lines changed

.github/workflows/run-code-ql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
3030

3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@f1f6e5f6af878fb37288ce1c627459e94dbf7d01
32+
uses: github/codeql-action/init@d3678e237b9c32a6c9bffb3315c335f976f3549f
3333
with:
3434
languages: ${{ matrix.language }}
3535

@@ -53,6 +53,6 @@ jobs:
5353
run: pnpm install --frozen-lockfile
5454

5555
- name: Perform CodeQL analysis
56-
uses: github/codeql-action/analyze@f1f6e5f6af878fb37288ce1c627459e94dbf7d01
56+
uses: github/codeql-action/analyze@d3678e237b9c32a6c9bffb3315c335f976f3549f
5757
with:
5858
category: /language:${{ matrix.language }}

backend/apps/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""OWASP API."""

backend/apps/api/admin/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .api_key import ApiKeyAdmin

backend/apps/nest/admin/api_key.py renamed to backend/apps/api/admin/api_key.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
"""Nest app APIKey model admin."""
1+
"""API key model admin."""
22

33
from django.contrib import admin
44

5-
from apps.nest.models.api_key import ApiKey
5+
from apps.api.models.api_key import ApiKey
66

77

88
class ApiKeyAdmin(admin.ModelAdmin):

backend/apps/api/apps.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""API app config."""
2+
3+
from django.apps import AppConfig
4+
5+
6+
class ApiConfig(AppConfig):
7+
"""API app config."""
8+
9+
name = "apps.api"
File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""API app mutations."""
2+
3+
import strawberry
4+
5+
from .api_key import ApiKeyMutations
6+
7+
8+
@strawberry.type
9+
class ApiMutations(ApiKeyMutations):
10+
"""API mutations."""

backend/apps/nest/api/internal/mutations/api_key.py renamed to backend/apps/api/internal/mutations/api_key.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Nest API key api.internal Mutations."""
1+
"""API app mutations."""
22

33
import logging
44
from datetime import datetime
@@ -9,9 +9,9 @@
99
from django.utils import timezone
1010
from strawberry.types import Info
1111

12-
from apps.nest.api.internal.nodes.api_key import ApiKeyNode
12+
from apps.api.internal.nodes.api_key import ApiKeyNode
13+
from apps.api.models.api_key import MAX_ACTIVE_KEYS, MAX_WORD_LENGTH, ApiKey
1314
from apps.nest.api.internal.permissions import IsAuthenticated
14-
from apps.nest.models.api_key import MAX_ACTIVE_KEYS, MAX_WORD_LENGTH, ApiKey
1515

1616
logger = logging.getLogger(__name__)
1717

@@ -38,7 +38,7 @@ class CreateApiKeyResult:
3838

3939
@strawberry.type
4040
class ApiKeyMutations:
41-
"""api.internal mutation class for API keys."""
41+
"""API key mutations."""
4242

4343
@strawberry.mutation(permission_classes=[IsAuthenticated])
4444
def create_api_key(self, info: Info, name: str, expires_at: datetime) -> CreateApiKeyResult:
File renamed without changes.

backend/apps/nest/api/internal/nodes/api_key.py renamed to backend/apps/api/internal/nodes/api_key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import strawberry
44
import strawberry_django
55

6-
from apps.nest.models.api_key import ApiKey
6+
from apps.api.models.api_key import ApiKey
77

88

99
@strawberry_django.type(

0 commit comments

Comments
 (0)