@ -1975,7 +1975,7 @@ func updateAttachments(item interface{}, files []string) error {
case * models . Comment :
case * models . Comment :
attachments = content . Attachments
attachments = content . Attachments
default :
default :
return fmt . Errorf ( "Unknow Type" )
return fmt . Errorf ( "Unknown Type: %T " , content )
}
}
for i := 0 ; i < len ( attachments ) ; i ++ {
for i := 0 ; i < len ( attachments ) ; i ++ {
if util . IsStringInSlice ( attachments [ i ] . UUID , files ) {
if util . IsStringInSlice ( attachments [ i ] . UUID , files ) {
@ -1993,7 +1993,7 @@ func updateAttachments(item interface{}, files []string) error {
case * models . Comment :
case * models . Comment :
err = content . UpdateAttachments ( files )
err = content . UpdateAttachments ( files )
default :
default :
return fmt . Errorf ( "Unknow Type" )
return fmt . Errorf ( "Unknown Type: %T " , content )
}
}
if err != nil {
if err != nil {
return err
return err
@ -2005,7 +2005,7 @@ func updateAttachments(item interface{}, files []string) error {
case * models . Comment :
case * models . Comment :
content . Attachments , err = models . GetAttachmentsByCommentID ( content . ID )
content . Attachments , err = models . GetAttachmentsByCommentID ( content . ID )
default :
default :
return fmt . Errorf ( "Unknow Type" )
return fmt . Errorf ( "Unknown Type: %T " , content )
}
}
return err
return err
}
}