From f5b8a58c3476fc721d2c8b5df0f8b0537766e133 Mon Sep 17 00:00:00 2001 From: Zeeshan Khan Date: Sun, 20 Aug 2023 01:16:47 -0500 Subject: [PATCH] adding index and privacy policy --- web/app/__init__.py | 8 ++++ web/app/frontend.py | 18 ++++++++ web/app/templates/index.html | 0 web/html/index.html | 90 ++++++++++++++++++++++++++++++++++++ web/html/privacy_policy.html | 68 +++++++++++++++++++++++++++ 5 files changed, 184 insertions(+) create mode 100644 web/app/frontend.py delete mode 100644 web/app/templates/index.html create mode 100644 web/html/index.html create mode 100644 web/html/privacy_policy.html diff --git a/web/app/__init__.py b/web/app/__init__.py index 05fb686..f1bf38f 100644 --- a/web/app/__init__.py +++ b/web/app/__init__.py @@ -1,6 +1,7 @@ import logging from fastapi import FastAPI, Depends +from fastapi.responses import RedirectResponse from starlette.middleware.sessions import SessionMiddleware from fastapi.middleware.cors import CORSMiddleware from app.auth import check_api_key @@ -12,6 +13,7 @@ def create_app(config: Settings) -> FastAPI: from .auth import auth as auth_app from .core import core as core_app + from .frontend import frontend as frontend_app app = FastAPI(title="Youtube Helper",description="a description") app.add_middleware(SessionMiddleware, secret_key=config.secret_key) @@ -22,6 +24,12 @@ def create_app(config: Settings) -> FastAPI: allow_methods=["*"], allow_headers=["*"], ) + + app.include_router( + frontend_app, + tags=["Frontend"], + prefix="", + ) app.include_router( auth_app, tags=["Authentication"], diff --git a/web/app/frontend.py b/web/app/frontend.py new file mode 100644 index 0000000..d4f769a --- /dev/null +++ b/web/app/frontend.py @@ -0,0 +1,18 @@ +import logging + +from fastapi import APIRouter +from fastapi.responses import HTMLResponse + + +logger = logging.getLogger(__name__) + + +frontend = APIRouter() + +@frontend.get("/") +async def index(): + return HTMLResponse(open("./html/index.html", "r").read()) + +@frontend.get("/privacy") +async def privacy(): + return HTMLResponse(open("./html/privacy_policy.html", "r").read()) diff --git a/web/app/templates/index.html b/web/app/templates/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/web/html/index.html b/web/html/index.html new file mode 100644 index 0000000..f35b2d1 --- /dev/null +++ b/web/html/index.html @@ -0,0 +1,90 @@ + + + + + + + Youtube Upload Helper + + + + +
+

Youtube Upload Helper API

+

About the API

+

+ The Youtube Upload Helper is a self-hosted application designed to provide a simple API for uploading videos to YouTube. + Especially useful for systems where video files are automatically generated, this tool facilitates the automated process of uploading them to YouTube. +

+ +

How to Use

+

+ 1. Ensure the application is properly set up on your server or platform.
+ 2. Authenticate with your Google account, granting the necessary permissions.
+ 3. Make a POST request to the API endpoint with the following parameters: +

+ 4. The API will return a response once the video is uploaded successfully.
+ 5. You can check all the available API endpoints here. +

+ +

+ For more details on privacy and data handling, please refer to our Privacy Policy. +

+
+ + + diff --git a/web/html/privacy_policy.html b/web/html/privacy_policy.html new file mode 100644 index 0000000..4272954 --- /dev/null +++ b/web/html/privacy_policy.html @@ -0,0 +1,68 @@ + + + + + + + Privacy Policy for Youtube Upload Helper + + + + +

Privacy Policy for Youtube Upload Helper

+
+

Last Updated: 2023-08-20

+
+ +

1. Introduction

+

Welcome to "Youtube Upload Helper" (referred to as "we", "our", or "us"). Your privacy is of utmost importance to us. This Privacy Policy outlines the type of information we collect and how we use this information when you use our self-hosted application to manage your YouTube videos via Google's YouTube v3 API.

+ +

2. Information We Collect

+

Given the nature of our service, we only collect the minimum amount of data necessary to facilitate the upload of your videos to YouTube. Specifically:

+ + +

3. How We Use Your Information

+ + +

4. Data Storage and Security

+ + +

5. Data Sharing and Third Parties

+ + +

6. User Rights and Control

+ + +

7. Changes to This Privacy Policy

+

From time to time, we may update this Privacy Policy. If we make any material changes, we will notify users through an updated version of the policy. We encourage you to review this policy regularly to stay informed about how we protect your data.

+ +

8. Contact Us

+

If you have questions or concerns about this Privacy Policy or our data practices, please contact us at zkhan1093[at]gmail.com.

+ +
+

By using "Youtube Upload Helper", you agree to the terms outlined in this Privacy Policy.

+ + +