fix: paginas de teste
All checks were successful
BCards Deployment Pipeline / Run Tests (push) Successful in 2s
BCards Deployment Pipeline / PR Validation (push) Has been skipped
BCards Deployment Pipeline / Build and Push Image (push) Successful in 15m7s
BCards Deployment Pipeline / Deploy to Production (ARM - OCI) (push) Successful in 2m0s
BCards Deployment Pipeline / Deploy to Test (x86 - Local) (push) Has been skipped
BCards Deployment Pipeline / Cleanup Old Resources (push) Has been skipped
BCards Deployment Pipeline / Deployment Summary (push) Successful in 0s

This commit is contained in:
Ricardo Carneiro 2025-09-18 18:21:51 -03:00
parent 1d80b48a81
commit 28777d8437
2 changed files with 20 additions and 9 deletions

View File

@ -94,9 +94,11 @@ public class UserPage : IPageDisplay
// Exclusão lógica // Exclusão lógica
[BsonElement("deletedAt")] [BsonElement("deletedAt")]
[BsonIgnoreIfDefault]
public DateTime? DeletedAt { get; set; } public DateTime? DeletedAt { get; set; }
[BsonElement("deletionReason")] [BsonElement("deletionReason")]
[BsonIgnoreIfDefault]
public string? DeletionReason { get; set; } // "trial_expired", "user_requested", "moderation_violation" public string? DeletionReason { get; set; } // "trial_expired", "user_requested", "moderation_violation"
[BsonIgnore] [BsonIgnore]

View File

@ -217,7 +217,15 @@
@section Scripts { @section Scripts {
<script> <script>
function recordClick(pageId, linkIndex) { function recordClick(pageId, linkIndex) {
fetch('/click/' + pageId, { // Detectar se é LivePage ou UserPage
var isLivePage = @Json.Serialize(isLivePage);
if (isLivePage) {
// LivePages não registram cliques via fetch - usam redirecionamento direto
return;
} else {
// UserPages registram cliques via API
fetch('/page/click/' + pageId, {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -227,6 +235,7 @@
console.log('Error recording click:', error); console.log('Error recording click:', error);
}); });
} }
}
function toggleLinkDetails(linkIndex) { function toggleLinkDetails(linkIndex) {
const currentDetails = document.getElementById('details-' + linkIndex); const currentDetails = document.getElementById('details-' + linkIndex);