Files
backend/services/UserService.h
T

35 lines
1.2 KiB
C++

#pragma once
#include "common/Auth.h"
#include <json/json.h>
#include <optional>
#include <string>
namespace visione::services
{
class UserService
{
public:
Json::Value listNotifications(const auth::UserContext &user,
const std::optional<std::string> &page,
const std::optional<std::string> &perPage);
Json::Value markNotificationRead(const auth::UserContext &user,
long long notificationId);
Json::Value markAllNotificationsRead(const auth::UserContext &user);
Json::Value rewards(const auth::UserContext &user,
const std::optional<std::string> &page,
const std::optional<std::string> &perPage);
static void createNotification(long long userId,
const std::string &type,
const std::string &title,
const std::string &body,
std::optional<long long> reportId);
static void awardReportOwner(long long reportId,
const std::string &reason,
int points);
};
} // namespace visione::services