-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration tests topics org crud (#72)
* Integration tests for orgs and topics * Fix group type * Fix build * Fix build * feat: add schemas for all entities * feat: implement all fields for resources and datasets * feat: review scehmas for organization and geography * fix: validation for units * fix: indexing for the topics field * feat: index contributors * feat: update the example env to include schema-related env vars * feat: add documentation * fix: documentation image * feat: custom SOLR schema * feat: update prod Dockerfile to have all dependencies * feat: add geography_shape field to the geography custom group * feat: upgrade TDC plugin version * fix: tests * feat: make extension versions fixed * clean: clean dockerfiles * setup dataset browse page * fix review issues * fix filters y space * Update search.tsx * fix badges cound * fix: units field throwing error * feat: upgrade live deployment to fix units field bug * Integration tests for orgs and topics --------- Co-authored-by: Demenech <[email protected]> Co-authored-by: William Lima <[email protected]>
- Loading branch information
1 parent
7fac660
commit 6d1b3a3
Showing
20 changed files
with
278 additions
and
425 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { | ||
createTRPCRouter, | ||
protectedProcedure, | ||
publicProcedure, | ||
} from "@/server/api/trpc"; | ||
import { env } from "@/env.mjs"; | ||
import { z } from "zod"; | ||
import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; | ||
import { GetObjectCommand } from "@aws-sdk/client-s3"; | ||
import r2 from "@/server/r2"; | ||
|
||
export const matomoRouter = createTRPCRouter({ | ||
getVisitorStats: publicProcedure.query(async ({ input }) => { | ||
const matomoApiUrl = `${env.MATOMO_URL}/index.php`; | ||
const params = { | ||
module: "API", | ||
method: "Actions.getPageUrls", | ||
idSite: env.MATOMO_SITE_ID, | ||
period: "day", | ||
date: "today", | ||
format: "JSON", | ||
token_auth: env.MATOMO_AUTH_KEY, | ||
}; | ||
const urlParams = new URLSearchParams(params).toString(); | ||
const response = await fetch(`${matomoApiUrl}?${urlParams}`); | ||
const data = await response.json(); | ||
return data; | ||
}), | ||
}); |
Oops, something went wrong.