mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(federation): 🚚 Move old function to User
This commit is contained in:
parent
3b2c0d3b5a
commit
fbb845f7f8
2 changed files with 17 additions and 19 deletions
|
|
@ -1,16 +0,0 @@
|
|||
import type { Unfollow } from "@versia/federation/types";
|
||||
import type { User } from "~/packages/database-interface/user";
|
||||
|
||||
export const unfollowFederationRequest = (
|
||||
unfollower: User,
|
||||
unfollowing: User,
|
||||
): Unfollow => {
|
||||
const id = crypto.randomUUID();
|
||||
return {
|
||||
type: "Unfollow",
|
||||
id,
|
||||
author: unfollower.getUri(),
|
||||
created_at: new Date().toISOString(),
|
||||
followee: unfollowing.getUri(),
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue