mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-24 04:51:27 +00:00
feat: Test if getting headers works
This commit is contained in:
parent
9376fe151f
commit
e0ea004e80
|
@ -4,6 +4,8 @@
|
|||
import asyncio
|
||||
from typing import AsyncGenerator
|
||||
import strawberry
|
||||
from strawberry.types import Info
|
||||
|
||||
from selfprivacy_api.graphql import IsAuthenticated
|
||||
from selfprivacy_api.graphql.mutations.api_mutations import ApiMutations
|
||||
from selfprivacy_api.graphql.mutations.job_mutations import JobMutations
|
||||
|
@ -58,6 +60,11 @@ class Query:
|
|||
"""Services queries"""
|
||||
return Services()
|
||||
|
||||
@strawberry.field()
|
||||
def test(self, info: Info) -> str:
|
||||
"""Test query"""
|
||||
return info.context["request"].headers["Accept-Language"]
|
||||
|
||||
|
||||
@strawberry.type
|
||||
class Mutation(
|
||||
|
|
Loading…
Reference in a new issue