Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Chore/delete unused files (#283)
Browse files Browse the repository at this point in the history
* Feature/posthog frontend (#242)

* Create param validator

* Move discord

* Move user settings getter to app router

* Use standard var

* move getAllPublicUserData to app router

* Better error handling

* Delete getAllData.ts

* Delete discord

* Throw errors

* Handle error throwing

* Move updateSettings to app router

* Update confluence.svg

* Configure jest

* Create settings.test.ts

* Create updateSettings.test.ts

* Add getting test

* Use generalized validator

* Move Stripe to app router

* Move Sendgrid to app router

* Move vscode to airtable Analytics to app router

* Frontend analytics

* Change export

* Fix export

* Fix export

* Feature/posthog backend (#243)

* Create param validator

* Move discord

* Move user settings getter to app router

* Use standard var

* move getAllPublicUserData to app router

* Better error handling

* Delete getAllData.ts

* Delete discord

* Throw errors

* Handle error throwing

* Move updateSettings to app router

* Update confluence.svg

* Configure jest

* Create settings.test.ts

* Create updateSettings.test.ts

* Add getting test

* Use generalized validator

* Move Stripe to app router

* Move Sendgrid to app router

* Move vscode to airtable Analytics to app router

* Create posthog.ts

* Add types, move to utils

* Capture posthog event

* Change export

* Fix export

* Fix export

* Check dev env

* Move discord

* Use standard var

* Better error handling

* Delete discord

* Move Sendgrid to app router

* Fix export

* Upgrade routes to return 400 on missing params

* Add status codes

* Check status returned

* Test settings getter

* Feature/posthog frontend (#242)

* Create param validator

* Move discord

* Move user settings getter to app router

* Use standard var

* move getAllPublicUserData to app router

* Better error handling

* Delete getAllData.ts

* Delete discord

* Throw errors

* Handle error throwing

* Move updateSettings to app router

* Update confluence.svg

* Configure jest

* Create settings.test.ts

* Create updateSettings.test.ts

* Add getting test

* Use generalized validator

* Move Stripe to app router

* Move Sendgrid to app router

* Move vscode to airtable Analytics to app router

* Frontend analytics

* Change export

* Fix export

* Fix export

* Feature/posthog backend (#243)

* Create param validator

* Move discord

* Move user settings getter to app router

* Use standard var

* move getAllPublicUserData to app router

* Better error handling

* Delete getAllData.ts

* Delete discord

* Throw errors

* Handle error throwing

* Move updateSettings to app router

* Update confluence.svg

* Configure jest

* Create settings.test.ts

* Create updateSettings.test.ts

* Add getting test

* Use generalized validator

* Move Stripe to app router

* Move Sendgrid to app router

* Move vscode to airtable Analytics to app router

* Create posthog.ts

* Add types, move to utils

* Capture posthog event

* Change export

* Fix export

* Fix export

* Check dev env

* Extract response types

* Use responseTypes

* Fix settings to use data response

* Early return if no apiKey

* Add error events

* Remove event logging

* Use request URL to pass to posthog

* Extract tracking

* Use tracker object

* Move to route

* Fix typo

* Create route groups

* Fix imports

* Delete layout.tsx

* Feature/posthog frontend (#242)

* Create param validator

* Move discord

* Move user settings getter to app router

* Use standard var

* move getAllPublicUserData to app router

* Better error handling

* Delete getAllData.ts

* Delete discord

* Throw errors

* Handle error throwing

* Move updateSettings to app router

* Update confluence.svg

* Configure jest

* Create settings.test.ts

* Create updateSettings.test.ts

* Add getting test

* Use generalized validator

* Move Stripe to app router

* Move Sendgrid to app router

* Move vscode to airtable Analytics to app router

* Frontend analytics

* Change export

* Fix export

* Fix export

* Move discord

* Use standard var

* Better error handling

* Delete discord

* Move Sendgrid to app router

* Fix export

* Upgrade routes to return 400 on missing params

* Add status codes

* Check status returned

* Test settings getter

* Feature/posthog frontend (#242)

* Create param validator

* Move discord

* Move user settings getter to app router

* Use standard var

* move getAllPublicUserData to app router

* Better error handling

* Delete getAllData.ts

* Delete discord

* Throw errors

* Handle error throwing

* Move updateSettings to app router

* Update confluence.svg

* Configure jest

* Create settings.test.ts

* Create updateSettings.test.ts

* Add getting test

* Use generalized validator

* Move Stripe to app router

* Move Sendgrid to app router

* Move vscode to airtable Analytics to app router

* Frontend analytics

* Change export

* Fix export

* Fix export

* Feature/posthog backend (#243)

* Create param validator

* Move discord

* Move user settings getter to app router

* Use standard var

* move getAllPublicUserData to app router

* Better error handling

* Delete getAllData.ts

* Delete discord

* Throw errors

* Handle error throwing

* Move updateSettings to app router

* Update confluence.svg

* Configure jest

* Create settings.test.ts

* Create updateSettings.test.ts

* Add getting test

* Use generalized validator

* Move Stripe to app router

* Move Sendgrid to app router

* Move vscode to airtable Analytics to app router

* Create posthog.ts

* Add types, move to utils

* Capture posthog event

* Change export

* Fix export

* Fix export

* Check dev env

* Extract response types

* Use responseTypes

* Fix settings to use data response

* Early return if no apiKey

* Add error events

* Remove event logging

* Use request URL to pass to posthog

* Extract tracking

* Use tracker object

* Move to route

* Fix typo

* Create route groups

* Fix imports

* Delete layout.tsx

* Update route.ts

* Delete discord

* Remove discord

* Delete discord

* Delete discord

* Remove pages folder

* Delete azureAppInsights.ts

* Remove unused files

* Restore needed file

* Fix user getting in index
  • Loading branch information
EstebanDalelR committed Sep 14, 2023
1 parent 979aa6f commit 297ecf6
Show file tree
Hide file tree
Showing 35 changed files with 6 additions and 860 deletions.
7 changes: 5 additions & 2 deletions app/api/analytics/vsmarketplace/update/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
import validateParams from "../../../../../utils/api/validateParams";
import Airtable from "airtable";
import { missingParamsResponse } from "../../../../../utils/api/responses";
import { missingParamsPosthogTracking } from "../../../../../utils/api/posthogTracking";
import posthog from "../../../../../utils/posthog/posthog";
Airtable.configure({
endpointUrl: "https://api.airtable.com",
apiKey: process.env.AIRTABLE_API_KEY,
Expand Down Expand Up @@ -33,7 +33,10 @@ export async function POST(request: Request) {
const { missingParams } = validateParams(req, ["dailyStats"]);

if (missingParams.length > 0) {
missingParamsPosthogTracking({ missingParams, url: request.url });
posthog.capture({
event: `${request.url}-missing-params`,
properties: missingParams,
});
return missingParamsResponse({ missingParams });
}
const { dailyStats } = req;
Expand Down
19 changes: 0 additions & 19 deletions components/DiscordLoginLink.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions components/loginGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import GitHubLoginLink from "../components/GitHubLoginLink";
import GitLabLoginLink from "../components/GitLabLoginLink";
import BitbucketLoginLink from "../components/BitbucketLoginLink";
import LinearLoginLink from "../components/LinearLoginLink";
import DiscordLoginLink from "./DiscordLoginLink";
import NotionLoginLink from "./NotionLoginLink";
import ConfluenceLoginLink from "./ConfluenceLoginLink";
type LoginGridProps = {
Expand All @@ -19,7 +18,6 @@ function LoginGrid({ userEmail, data }) {
let slackUserData: null | LoginGridProps = null;
let jiraUserData: null | LoginGridProps = null;
let confluenceUserData: null | LoginGridProps = null;
let discordUserData: null | LoginGridProps = null;
let notionUserData: null | LoginGridProps = null;
let linearUserData: null | LoginGridProps = null;
if (data?.github_data) {
Expand All @@ -40,9 +38,6 @@ function LoginGrid({ userEmail, data }) {
if (data?.confluence_data) {
confluenceUserData = JSON.parse(data.confluence_data);
}
if (data?.discord_data) {
discordUserData = JSON.parse(data.discord_data);
}
if (data?.notion_data) {
notionUserData = JSON.parse(data.notion_data);
}
Expand Down Expand Up @@ -202,22 +197,6 @@ function LoginGrid({ userEmail, data }) {
<LinearLoginLink userEmail={userEmail} />
)}
</div>
{/*
DISCORD DOES NOT ALLOW MESSAGE SEARCH, DEVELOPMENT PAUSED FOR NOW
MAYBE READ THE LAST FEW DAYS?
<div className="p-3">
{discordUserData?.user_displayname ? (
<InfoPanel
info={{
user_avatar_url: `https://cdn.discordapp.com/avatars/${discordUserData.id}/${discordUserData.avatar_url}`,
...discordUserData,
service_name: "Discord",
}}
/>
) : (
<DiscordLoginLink userEmail={userEmail} />
)}
</div> */}
</div>
</div>
<div>
Expand Down
17 changes: 0 additions & 17 deletions utils/analytics/azureAppInsights.ts

This file was deleted.

15 changes: 0 additions & 15 deletions utils/api/getAllUserData.ts

This file was deleted.

2 changes: 1 addition & 1 deletion utils/api/getAllUserPublicData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import "server-only";
import getAllPublicUserData from "../db/user/getAllPublicUserData";
export default async function getData({ userEmail }) {
let dbUser = await getAllPublicUserData(userEmail);
let dbUser = await getAllPublicUserData({ email: userEmail });
return dbUser;
}
16 changes: 0 additions & 16 deletions utils/api/getBitbucketInfo.ts

This file was deleted.

15 changes: 0 additions & 15 deletions utils/api/getDiscordInfo.ts

This file was deleted.

15 changes: 0 additions & 15 deletions utils/api/getGitHubInfo.ts

This file was deleted.

15 changes: 0 additions & 15 deletions utils/api/getGitLabInfo.ts

This file was deleted.

13 changes: 0 additions & 13 deletions utils/api/getJiraInfo.ts

This file was deleted.

21 changes: 0 additions & 21 deletions utils/api/getPaymentInfo.ts

This file was deleted.

15 changes: 0 additions & 15 deletions utils/api/getSlackInfo.ts

This file was deleted.

16 changes: 0 additions & 16 deletions utils/bitbucket/getUserData.ts

This file was deleted.

13 changes: 0 additions & 13 deletions utils/db/bitbucket/getUser.ts

This file was deleted.

14 changes: 0 additions & 14 deletions utils/db/discord/getAPIAccessInfo.ts

This file was deleted.

13 changes: 0 additions & 13 deletions utils/db/discord/getUser.ts

This file was deleted.

16 changes: 0 additions & 16 deletions utils/db/discord/saveUser.ts

This file was deleted.

22 changes: 0 additions & 22 deletions utils/db/discord/updateTokens.ts

This file was deleted.

13 changes: 0 additions & 13 deletions utils/db/gitlab/getUser.ts

This file was deleted.

19 changes: 0 additions & 19 deletions utils/discord/refreshTokens.ts

This file was deleted.

Loading

0 comments on commit 297ecf6

Please sign in to comment.