-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from holo-social/revert-14-robyn
Revert "Migration to Robyn"
- Loading branch information
Showing
31 changed files
with
841 additions
and
500 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,4 @@ job: | |
debug: | ||
enable: true | ||
profiling: false | ||
nossl: false | ||
|
||
extends: | ||
workers: 4 | ||
process: 4 | ||
nossl: false |
Empty file.
This file contains 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
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
model BEConfig { // 略してベーコn((( | ||
id String @id @default("hol0") | ||
host String @unique | ||
name String @default("Hol0") | ||
description String @default("An Interconnected Extensible Microblogging Platform🪐") | ||
repositoryUrl String @default("https://github.com/hol0-dev/backend") | ||
feedbackUrl String @default("https://github.com/hol0-dev/backend/issues") | ||
admin String? | ||
adminEmail String? // 実はメールアドレス以外も入る。 | ||
maintainerName String? | ||
maintainerEmail String? | ||
impressumUrl String? | ||
tosUrl String? | ||
privacyPolicyUrl String? | ||
PushNotification Boolean @default(false) | ||
SWPublicKey String? | ||
SWPrivateKey String? | ||
enableMail Boolean @default(false) | ||
mailAddress String? | ||
smtpHost String? | ||
smtpPort String? | ||
smtpUser String? | ||
smtpPass String? | ||
smtpSSL Boolean @default(false) | ||
useObjectStorage Boolean @default(false) | ||
s3BaseUrl String? | ||
s3Bucket String? | ||
s3Prefix String? | ||
s3Endpoint String? | ||
s3Region String @default("us-east-1") | ||
s3AccessKey String? | ||
s3SecretKey String? | ||
s3useSSL Boolean @default(false) | ||
s3ForcePathStyle Boolean @default(false) | ||
s3setPublicRead Boolean @default(false) | ||
enableTurnstile Boolean @default(false) | ||
turnstileSiteKey String? | ||
turnstileSecretKey String? | ||
faviconUrl String? | ||
appleTouchIconUrl String? | ||
androidTouchIconUrl String? | ||
themeColor String @default("#B0F7DD") | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
model ChannelFollow { | ||
followeeId String @id | ||
channelId String | ||
createdAt DateTime @default(now()) | ||
channel Channel @relation(fields: [channelId], references: [id], onDelete: Cascade) | ||
followee User @relation("channelFollowee", fields: [followeeId], references: [id], onDelete: Cascade) | ||
} | ||
|
||
model Channel { | ||
id String @id | ||
name String | ||
description String | ||
remote String? | ||
createdAt DateTime @default(now()) @map("created_at") | ||
updatedAt DateTime @default(now()) @updatedAt @map("updated_at") | ||
host Instance? @relation(fields: [remote], references: [host]) | ||
followers ChannelFollow[] | ||
notes Note[] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
model Instance { | ||
id String @id | ||
host String @unique | ||
usersCount Int @default(0) | ||
notesCount Int @default(0) | ||
name String? | ||
description String? | ||
iconUrl String | ||
faviconUrl String | ||
themeColor String @default("#ffffff") | ||
firstRetrievedAt DateTime? @default(now()) | ||
isNotResponding Boolean? @default(false) | ||
isSuspended Boolean? @default(false) | ||
isBlocked Boolean? @default(false) | ||
isSilenced Boolean? @default(false) | ||
softwareName String? | ||
softwareVersion String? | ||
softwareHomepage String? | ||
openRegistrations Boolean | ||
adminName String? | ||
adminEmail String? | ||
maintainerName String? | ||
maintainerEmail String? | ||
infoUpdatedAt DateTime @default(now()) | ||
latestRequestReceivedAt DateTime @default(now()) | ||
moderationNote String? | ||
langs String[] | ||
tosUrl String? | ||
privacyPolicyUrl String? | ||
inquiryUrl String? | ||
impressumUrl String? | ||
repositoryUrl String? | ||
feedbackUrl String? | ||
channels Channel[] | ||
user User[] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
model Reactions { | ||
id String @id @default(cuid()) | ||
noteId String | ||
userId String | ||
note Note @relation(fields: [noteId], references: [id]) | ||
user User @relation(fields: [userId], references: [id], onDelete: Cascade) | ||
} | ||
|
||
model File { | ||
id String @id | ||
hash String @unique | ||
url String | ||
isSensitive Boolean | ||
fileSize Int? | ||
fileType String | ||
caption String? | ||
createdAt DateTime @default(now()) @map("created_at") | ||
attachedNotes Note[] @relation("AttachmentsToNote") | ||
} | ||
|
||
model Note { | ||
id String @id | ||
content String? | ||
content_html String? | ||
username String | ||
createdAt DateTime @default(now()) @map("created_at") | ||
updatedAt DateTime @default(now()) @map("updated_at") | ||
visibility String | ||
visibleUserIds String[] | ||
replyId String? | ||
renoteId String? | ||
channelId String? | ||
channel Channel? @relation(fields: [channelId], references: [id], onDelete: Cascade) | ||
authorId String | ||
author User @relation(fields: [authorId], references: [id], onDelete: Cascade) | ||
reactions Reactions[] | ||
attachments File[] @relation("AttachmentsToNote") | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
generator client { | ||
provider = "prisma-client-py" | ||
} | ||
|
||
datasource db { | ||
provider = "postgresql" | ||
url = env("DATABASE_URL") | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
model Field { | ||
id String @id | ||
authorId String | ||
name String | ||
value String | ||
user User @relation(fields: [authorId], references: [id]) | ||
} | ||
|
||
model User { | ||
id String @id | ||
host String | ||
username String | ||
email String? @unique | ||
password String? // BackendやWheet経由ではパスワードなしのユーザーは作成できない。ただシステムのユーザー用にNoneなパスワードも設定できるようになってる | ||
displayName String? | ||
description String? | ||
avatarUrl String? | ||
bannerUrl String? | ||
bday DateTime? | ||
address String? | ||
manuallyApprovesFollowers Boolean @default(false) | ||
discoverable Boolean @default(true) | ||
publicKeyPem String | ||
publicKeyOwner String | ||
privateKeyPem String? | ||
accessTokens AccessToken[] | ||
channelFollowees ChannelFollow[] @relation("channelFollowee") | ||
notes Note[] | ||
reactions Reactions[] | ||
fields Field[] | ||
followees Follow[] @relation("followee") | ||
followers Follow[] @relation("follower") | ||
instance Instance? @relation(fields: [host], references: [host]) | ||
} | ||
|
||
model Follow { | ||
followerId String | ||
followeeId String | ||
createdAt DateTime @default(now()) | ||
followee User @relation("followee", fields: [followeeId], references: [id], onDelete: Cascade) | ||
follower User @relation("follower", fields: [followerId], references: [id], onDelete: Cascade) | ||
@@id([followerId, followeeId]) | ||
} | ||
|
||
|
||
model AccessToken { | ||
id String @id | ||
createdAt DateTime @default(now()) @map("created_at") | ||
updatedAt DateTime? @updatedAt | ||
expiresAt DateTime? | ||
name String | ||
scope String[] // if WebClient: web:read, web:write | ||
token String @unique | ||
userId String | ||
user User @relation(fields: [userId], references: [id], onDelete: Cascade) | ||
fromWeb Boolean @default(false) | ||
@@index([token]) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from robyn import SubRouter | ||
from fastapi import APIRouter | ||
|
||
from . import activitypub, avatar | ||
|
||
router = SubRouter("Holo") | ||
router = APIRouter() | ||
router.include_router(activitypub.router) | ||
router.include_router(avatar.router) |
4 changes: 2 additions & 2 deletions
4
src/app/routes/activitypub/__init__.py → app/routes/activitypub/__init__.py
This file contains 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
File renamed without changes.
This file contains 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
Oops, something went wrong.