mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-01 07:38:33 -04:00
fix: Move content into to frontend directory
Doing this BEFORE the merge prevents a lot of merge conflicts. Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
4e18ce38f3
commit
762a0a850e
1051 changed files with 0 additions and 35 deletions
76
frontend/src/pages/api/private/config.ts
Normal file
76
frontend/src/pages/api/private/config.ts
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import type { NextApiRequest, NextApiResponse } from 'next'
|
||||
import type { Config } from '../../../api/config/types'
|
||||
import { AuthProviderType } from '../../../api/config/types'
|
||||
import { HttpMethod, respondToMatchingRequest } from '../../../handler-utils/respond-to-matching-request'
|
||||
|
||||
const handler = (req: NextApiRequest, res: NextApiResponse) => {
|
||||
respondToMatchingRequest<Config>(HttpMethod.GET, req, res, {
|
||||
allowAnonymous: true,
|
||||
allowRegister: true,
|
||||
authProviders: [
|
||||
{
|
||||
type: AuthProviderType.LOCAL
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.LDAP,
|
||||
identifier: 'test-ldap',
|
||||
providerName: 'Test LDAP'
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.DROPBOX
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.FACEBOOK
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.GITHUB
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.GITLAB,
|
||||
identifier: 'test-gitlab',
|
||||
providerName: 'Test GitLab'
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.GOOGLE
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.OAUTH2,
|
||||
identifier: 'test-oauth2',
|
||||
providerName: 'Test OAuth2'
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.SAML,
|
||||
identifier: 'test-saml',
|
||||
providerName: 'Test SAML'
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.TWITTER
|
||||
}
|
||||
],
|
||||
branding: {
|
||||
name: 'DEMO Corp',
|
||||
logo: 'public/img/demo.png'
|
||||
},
|
||||
useImageProxy: false,
|
||||
specialUrls: {
|
||||
privacy: 'https://example.com/privacy',
|
||||
termsOfUse: 'https://example.com/termsOfUse',
|
||||
imprint: 'https://example.com/imprint'
|
||||
},
|
||||
version: {
|
||||
major: 2,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
commit: 'mock'
|
||||
},
|
||||
plantumlServer: 'https://www.plantuml.com/plantuml',
|
||||
maxDocumentLength: 1000000
|
||||
})
|
||||
}
|
||||
|
||||
export default handler
|
Loading…
Add table
Add a link
Reference in a new issue