function followUser
followUser(
followerId: string,
followedUserId: string
): void

Makes followerId follow followedUserId, and notifies the followed user. Following again changes nothing. The follower's other tabs are told.

Parameters

followerId: string
followedUserId: string

Return Type

void

Throws

APIException

400 when a user tries to follow themselves, 404 when there is no such user.

Usage

import { followUser } from "api/services/follow-service.ts";