[server] Make new links joinable by default

This commit is contained in:
Neeraj Gupta
2025-02-11 16:57:54 +05:30
parent 54d63c9969
commit 218c652ed1
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ import (
type CreatePublicAccessTokenRequest struct {
CollectionID int64 `json:"collectionID" binding:"required"`
EnableCollect bool `json:"enableCollect"`
// defaults to false
// defaults to true
EnableJoin *bool `json:"enableJoin"`
ValidTill int64 `json:"validTill"`
DeviceLimit int `json:"deviceLimit"`

View File

@@ -38,7 +38,7 @@ func (pcr *PublicCollectionRepository) GetAlbumUrl(token string) string {
func (pcr *PublicCollectionRepository) Insert(ctx context.Context,
cID int64, token string, validTill int64, deviceLimit int, enableCollect bool, enableJoin *bool) error {
// default value for enableJoin is true
join := false
join := true
if enableJoin != nil {
join = *enableJoin
}