mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Allow user to show instead of landing page on / (#922)
* configurable user instead of landing page * rename DefaultUser to LandingPageUser * code review changes and fix tests * try to fix pipeline error * code review changes * code review changes * code review changes * remove unnecessary line
This commit is contained in:
@@ -1794,3 +1794,29 @@ func GetAdvancedCookiesSamesite() string { return global.GetAdvancedCookiesSames
|
||||
|
||||
// SetAdvancedCookiesSamesite safely sets the value for global configuration 'AdvancedCookiesSamesite' field
|
||||
func SetAdvancedCookiesSamesite(v string) { global.SetAdvancedCookiesSamesite(v) }
|
||||
|
||||
// GetLandingPageUser safely fetches the Configuration value for state's 'LandingPageUser' field
|
||||
func (st *ConfigState) GetLandingPageUser() (v string) {
|
||||
st.mutex.Lock()
|
||||
v = st.config.LandingPageUser
|
||||
st.mutex.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
// SetLandingPageUser safely sets the Configuration value for state's 'LandingPageUser' field
|
||||
func (st *ConfigState) SetLandingPageUser(v string) {
|
||||
st.mutex.Lock()
|
||||
defer st.mutex.Unlock()
|
||||
st.config.LandingPageUser = v
|
||||
st.reloadToViper()
|
||||
}
|
||||
|
||||
// LandingPageUserFlag returns the flag name for the 'LandingPageUser' field
|
||||
func LandingPageUserFlag() string { return "landing-page-user" }
|
||||
|
||||
// GetLandingPageUser safely fetches the value for global configuration 'LandingPageUser' field
|
||||
func GetLandingPageUser() string { return global.GetLandingPageUser() }
|
||||
|
||||
// SetLandingPageUser safely sets the value for global configuration 'LandingPageUser' field
|
||||
func SetLandingPageUser(v string) { global.SetLandingPageUser(v) }
|
||||
|
||||
|
Reference in New Issue
Block a user