This file contains hidden or 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
| function hasUserGroup() { | |
| return exists(/databases/$(database)/documents/user_group/$(request.auth.uid)); | |
| } | |
| function getUserGroup() { | |
| return get(/databases/$(database)/documents/user_group/$(request.auth.uid)); | |
| } | |
| function isPermittedGroupWithinSet(allowedGroups, groups) { |
This file contains hidden or 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
| import {createWebapp} from "../../webapp/Webapp"; | |
| import * as functions from "firebase-functions"; | |
| import express from 'express'; | |
| const app = createWebapp(); | |
| app.use(require('prerender-node').set('prerenderToken', 'xxxxxxxxx')); | |
| // https://expressjs.com/en/guide/error-handling.html | |
| // add a better error handler | |
| app.use(function(err: Error, req: express.Request, res: express.Response, next: express.NextFunction) { |
This file contains hidden or 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
| import {createWebapp} from "../../webapp/Webapp"; | |
| import * as functions from "firebase-functions"; | |
| import express from 'express'; | |
| const app = createWebapp(); | |
| app.use(require('prerender-node').set('prerenderToken', 'xxxx')); | |
| // https://expressjs.com/en/guide/error-handling.html | |
| // add a better error handler | |
| app.use(function(err: Error, req: express.Request, res: express.Response, next: express.NextFunction) { |
This file contains hidden or 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
| * TLSv1.3 (IN), TLS handshake, Server hello (2): | |
| * TLSv1.2 (IN), TLS handshake, Certificate (11): | |
| * TLSv1.2 (IN), TLS handshake, Server key exchange (12): | |
| * TLSv1.2 (IN), TLS handshake, Server finished (14): | |
| * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): | |
| * TLSv1.2 (OUT), TLS change cipher, Client hello (1): | |
| * TLSv1.2 (OUT), TLS handshake, Finished (20): | |
| * TLSv1.2 (IN), TLS handshake, Finished (20): | |
| * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 | |
| * ALPN, server accepted to use h2 |
This file contains hidden or 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
| import * as functions from "firebase-functions"; | |
| import express from 'express'; | |
| const app = express(); | |
| console.log("SSR: Running with minimal SSR function"); | |
| app.use((req: express.Request, res: express.Response, next: express.NextFunction) => { | |
| console.log("SSR: : handling basic request"); | |
| res.status(200).send('Hello World\n'); |
This file contains hidden or 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
| import * as functions from "firebase-functions"; | |
| import express from 'express'; | |
| const app = express(); | |
| app.use((req: express.Request, res: express.Response, next: express.NextFunction) => { | |
| console.log("Hello World: : handling basic request"); | |
| res.status(200).send('Hello World\n'); | |
| next(); | |
| }); |
This file contains hidden or 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
| import * as functions from "firebase-functions"; | |
| import express from 'express'; | |
| import {Callback} from "polar-shared/src/util/Functions"; | |
| import {Webapps} from "../../webapp/Webapps"; | |
| let app = express(); | |
| // Google-Cloud-Tasks | |
| console.log("SSR: Running with production SSR function v7"); |
This file contains hidden or 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
| import * as React from 'react'; | |
| import {Devices} from "polar-shared/src/util/Devices"; | |
| import {AnnotationRepoTable2} from './AnnotationRepoTable2'; | |
| const Main = () => ( | |
| <div style={{ | |
| display: 'flex', | |
| flexDirection: 'column', | |
| minHeight: 0 |
This file contains hidden or 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
| import * as React from 'react'; | |
| import {RepoDocMetaLoader} from '../RepoDocMetaLoader'; | |
| import {RepoDocMetaManager} from '../RepoDocMetaManager'; | |
| import {IDocInfo} from 'polar-shared/src/metadata/IDocInfo'; | |
| import {IEventDispatcher} from '../../../../web/js/reactor/SimpleReactor'; | |
| import {PersistenceLayerManager} from '../../../../web/js/datastore/PersistenceLayerManager'; | |
| import AnnotationRepoTable from './AnnotationRepoTable'; | |
| import {UpdateFiltersCallback} from './AnnotationRepoFiltersHandler'; | |
| import {NULL_FUNCTION} from "polar-shared/src/util/Functions"; | |
| import {IDocAnnotation} from "../../../../web/js/annotation_sidebar/DocAnnotation"; |