chore: cleanup
This commit is contained in:
2
.github/workflows/e2e-tests.yml
vendored
2
.github/workflows/e2e-tests.yml
vendored
@ -1,7 +1,7 @@
|
|||||||
name: Playwright Tests
|
name: Playwright Tests
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['main']
|
branches: ['main', 'feat/rr7']
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ['main']
|
branches: ['main']
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -4,42 +4,41 @@ import { NEXT_PUBLIC_WEBAPP_URL } from '@documenso/lib/constants/app';
|
|||||||
|
|
||||||
import type { Route } from './+types/share.$slug';
|
import type { Route } from './+types/share.$slug';
|
||||||
|
|
||||||
// Todo: (RR7) Test on stg
|
|
||||||
export function meta({ params: { slug } }: Route.MetaArgs) {
|
export function meta({ params: { slug } }: Route.MetaArgs) {
|
||||||
return [
|
return [
|
||||||
{ title: 'Documenso - Share' },
|
{ title: 'Documenso - Share' },
|
||||||
{ description: 'I just signed a document in style with Documenso!' },
|
{ description: 'I just signed a document in style with Documenso!' },
|
||||||
{
|
{
|
||||||
property: 'og:title',
|
property: 'og:title',
|
||||||
title: 'Documenso - Join the open source signing revolution',
|
content: 'Documenso - Join the open source signing revolution',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
property: 'og:description',
|
property: 'og:description',
|
||||||
description: 'I just signed with Documenso!',
|
content: 'I just signed with Documenso!',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
property: 'og:type',
|
property: 'og:type',
|
||||||
type: 'website',
|
content: 'website',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
property: 'og:images',
|
property: 'og:image',
|
||||||
images: [`${NEXT_PUBLIC_WEBAPP_URL()}/share/${slug}/opengraph`],
|
content: `${NEXT_PUBLIC_WEBAPP_URL()}/share/${slug}/opengraph`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:site',
|
name: 'twitter:site',
|
||||||
site: '@documenso',
|
content: '@documenso',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:card',
|
name: 'twitter:card',
|
||||||
card: 'summary_large_image',
|
content: 'summary_large_image',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:images',
|
name: 'twitter:image',
|
||||||
images: [`${NEXT_PUBLIC_WEBAPP_URL()}/share/${slug}/opengraph`],
|
content: `${NEXT_PUBLIC_WEBAPP_URL()}/share/${slug}/opengraph`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'twitter:description',
|
name: 'twitter:description',
|
||||||
description: 'I just signed with Documenso!',
|
content: 'I just signed with Documenso!',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ tsRestHonoApp
|
|||||||
.get('/me', async (c) => testCredentialsHandler(c.req.raw));
|
.get('/me', async (c) => testCredentialsHandler(c.req.raw));
|
||||||
|
|
||||||
// Zapier. Todo: (RR7) Check methods. Are these get/post/update requests?
|
// Zapier. Todo: (RR7) Check methods. Are these get/post/update requests?
|
||||||
// Todo: (RR7) Is there really no validations?
|
|
||||||
tsRestHonoApp
|
tsRestHonoApp
|
||||||
.all('/zapier/list-documents', async (c) => listDocumentsHandler(c.req.raw))
|
.all('/zapier/list-documents', async (c) => listDocumentsHandler(c.req.raw))
|
||||||
.all('/zapier/subscribe', async (c) => subscribeHandler(c.req.raw))
|
.all('/zapier/subscribe', async (c) => subscribeHandler(c.req.raw))
|
||||||
|
@ -52,7 +52,7 @@ export const authenticatedMiddleware = <
|
|||||||
}
|
}
|
||||||
|
|
||||||
const metadata: ApiRequestMetadata = {
|
const metadata: ApiRequestMetadata = {
|
||||||
requestMetadata: extractRequestMetadata(request), // Todo: (RR7) Test
|
requestMetadata: extractRequestMetadata(request),
|
||||||
source: 'apiV1',
|
source: 'apiV1',
|
||||||
auth: 'api',
|
auth: 'api',
|
||||||
auditUser: {
|
auditUser: {
|
||||||
|
@ -146,8 +146,7 @@ export const handleOAuthCallbackUrl = async (options: HandleOAuthCallbackUrlOpti
|
|||||||
data: {
|
data: {
|
||||||
emailVerified: new Date(),
|
emailVerified: new Date(),
|
||||||
password: null,
|
password: null,
|
||||||
// Todo: (RR7) Check this
|
// Todo: (RR7) Will need to update the "password" account after the migration.
|
||||||
// Todo: (RR7) Not required after we setup password specific accounts.
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -71,28 +71,6 @@ export class InngestJobProvider extends BaseJobProvider {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// public getApiHandler() {
|
|
||||||
// const handler = createPagesRoute({
|
|
||||||
// client: this._client,
|
|
||||||
// functions: this._functions,
|
|
||||||
// });
|
|
||||||
|
|
||||||
// return async (req: NextApiRequest, res: NextApiResponse) => {
|
|
||||||
// // Since body-parser is disabled for this route we need to patch in the parsed body
|
|
||||||
// if (req.headers['content-type'] === 'application/json') {
|
|
||||||
// Object.assign(req, {
|
|
||||||
// body: await json(req),
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
||||||
// const nextReq = req as unknown as NextRequest;
|
|
||||||
|
|
||||||
// return await handler(nextReq, res);
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Todo: (RR7) Do we need to handle the above?
|
|
||||||
public getApiHandler() {
|
public getApiHandler() {
|
||||||
return async (context: HonoContext) => {
|
return async (context: HonoContext) => {
|
||||||
const handler = createHonoPagesRoute({
|
const handler = createHonoPagesRoute({
|
||||||
|
@ -64,6 +64,8 @@ export const listDocumentsHandler = async (req: Request) => {
|
|||||||
|
|
||||||
return Response.json([]);
|
return Response.json([]);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
|
||||||
return Response.json(
|
return Response.json(
|
||||||
{
|
{
|
||||||
message: 'Internal Server Error',
|
message: 'Internal Server Error',
|
||||||
|
@ -27,6 +27,8 @@ export const subscribeHandler = async (req: Request) => {
|
|||||||
|
|
||||||
return Response.json(createdWebhook);
|
return Response.json(createdWebhook);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
|
||||||
return Response.json(
|
return Response.json(
|
||||||
{
|
{
|
||||||
message: 'Internal Server Error',
|
message: 'Internal Server Error',
|
||||||
|
@ -24,6 +24,8 @@ export const unsubscribeHandler = async (req: Request) => {
|
|||||||
|
|
||||||
return Response.json(deletedWebhook);
|
return Response.json(deletedWebhook);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
|
||||||
return Response.json(
|
return Response.json(
|
||||||
{
|
{
|
||||||
message: 'Internal Server Error',
|
message: 'Internal Server Error',
|
||||||
|
Reference in New Issue
Block a user