Coverage for functions \ flipdare \ core \ app_backend_link.py: 100%

14 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2026-05-08 12:22 +1000

1#!/usr/bin/env python 

2# Copyright (c) 2026 Flipdare Pty Ltd. All rights reserved. 

3# 

4# This file is part of Flipdare's proprietary software and contains 

5# confidential and copyrighted material. Unauthorised copying, 

6# modification, distribution, or use of this file is strictly 

7# prohibited without prior written permission from Flipdare Pty Ltd. 

8# 

9# This software includes third-party components licensed under MIT, 

10# BSD, and Apache 2.0 licences. See THIRD_PARTY_NOTICES for details. 

11# 

12 

13# NOTE: FOR BACKEND/ADMIN USE ONLY. DO NOT USE THIS FOR FRONTEND LINKS. 

14 

15from __future__ import annotations 

16 

17 

18from enum import StrEnum 

19from flipdare.constants import BACKEND_BASE_LINK 

20 

21 

22class AppBackendLink(StrEnum): 

23 DARE = "dare" 

24 USER = "user" 

25 GROUP = "group" 

26 FLAG = "flag" 

27 RESTRICTION = "restriction" 

28 CHAT = "chat" 

29 PLEDGE = "pledge" 

30 

31 """ 

32 This is specifically for admin/backend link use. 

33 e.g. email/report links, admin dashboard links, etc. 

34 """ 

35 

36 def link(self, doc_id: str) -> str: 

37 return f"{BACKEND_BASE_LINK}{self.value}/{doc_id}"