Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Merge branch dev to main #196

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/kotlin/app/revanced/api/configuration/APISchema.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package app.revanced.api.configuration

import kotlinx.datetime.Clock
import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toLocalDateTime
import kotlinx.serialization.Serializable

interface ApiUser {
Expand Down Expand Up @@ -63,7 +66,7 @@ class ApiAnnouncement(
val attachments: List<String> = emptyList(),
// Using a list instead of a set because set semantics are unnecessary here.
val tags: List<String> = emptyList(),
val createdAt: LocalDateTime,
val createdAt: LocalDateTime = Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault()),
val archivedAt: LocalDateTime? = null,
val level: Int = 0,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ internal class AnnouncementRepository(private val database: Database) {
author = new.author
title = new.title
content = new.content
createdAt = new.createdAt
archivedAt = new.archivedAt
level = new.level
tags = SizedCollection(
Expand Down