PLT-2600/PLT-2770 Changed getPublicLink api call to return a proper JSON string (#2914)
* Removed unused channelId and userId parameters from web client getPublicLink method * Changed getPublicLink api call to return a proper JSON string
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
6c75662b82
Коммит
e1cae3b15b
@@ -178,6 +178,26 @@ func StringInterfaceFromJson(data io.Reader) map[string]interface{} {
|
||||
}
|
||||
}
|
||||
|
||||
func StringToJson(s string) string {
|
||||
b, err := json.Marshal(s)
|
||||
if err != nil {
|
||||
return ""
|
||||
} else {
|
||||
return string(b)
|
||||
}
|
||||
}
|
||||
|
||||
func StringFromJson(data io.Reader) string {
|
||||
decoder := json.NewDecoder(data)
|
||||
|
||||
var s string
|
||||
if err := decoder.Decode(&s); err != nil {
|
||||
return ""
|
||||
} else {
|
||||
return s
|
||||
}
|
||||
}
|
||||
|
||||
func IsLower(s string) bool {
|
||||
if strings.ToLower(s) == s {
|
||||
return true
|
||||
|
||||
Ссылка в новой задаче
Block a user