mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
Add new inbox endpoint
This commit is contained in:
parent
e618996936
commit
1027eada7c
5 changed files with 110 additions and 16 deletions
27
database/entities/RawActivity.ts
Normal file
27
database/entities/RawActivity.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import {
|
||||
BaseEntity,
|
||||
Column,
|
||||
Entity,
|
||||
ManyToMany,
|
||||
PrimaryGeneratedColumn,
|
||||
} from "typeorm";
|
||||
import { APActivity } from "activitypub-types";
|
||||
import { RawObject } from "./RawObject";
|
||||
|
||||
/**
|
||||
* Stores an ActivityPub activity as raw JSON-LD data
|
||||
*/
|
||||
@Entity({
|
||||
name: "activities",
|
||||
})
|
||||
export class RawActivity extends BaseEntity {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id!: string;
|
||||
|
||||
@Column("json")
|
||||
data!: APActivity;
|
||||
|
||||
// Any associated objects (there is typically only one)
|
||||
@ManyToMany(() => RawObject, object => object.id)
|
||||
objects!: RawObject[];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue