Fix cypress tests
This commit is contained in:
parent
a8e7b6f433
commit
fd6c15c282
|
|
@ -2,6 +2,7 @@
|
|||
import colors from "@/colors.json";
|
||||
import { useLearningPathStore } from "@/stores/learningPath";
|
||||
import * as d3 from "d3";
|
||||
import * as _ from "lodash";
|
||||
import * as log from "loglevel";
|
||||
|
||||
export default {
|
||||
|
|
@ -69,6 +70,7 @@ export default {
|
|||
newCircle.title = circle.title;
|
||||
newCircle.frontend_url = circle.frontend_url;
|
||||
newCircle.id = circle.id;
|
||||
newCircle.slug = _.kebabCase(circle.title);
|
||||
internalCircles.push(newCircle);
|
||||
});
|
||||
return internalCircles;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import structlog
|
||||
from django.views.decorators.cache import cache_page
|
||||
from rest_framework.decorators import api_view
|
||||
from rest_framework.response import Response
|
||||
from wagtail.models import Page
|
||||
|
|
@ -11,6 +12,7 @@ logger = structlog.get_logger(__name__)
|
|||
|
||||
|
||||
@api_view(["GET"])
|
||||
@cache_page(60 * 60 * 8, cache="api_page_cache")
|
||||
def page_api_view(request, slug):
|
||||
try:
|
||||
page = Page.objects.get(slug=slug, locale__language_code="de-CH")
|
||||
|
|
|
|||
Loading…
Reference in New Issue