// Copyright (c) 2024 mStar // // Licensed under the EUPL, Version 1.2 // // You may not use this work except in compliance with the Licence. // You should have received a copy of the Licence along with this work. If not, see: // . // See the Licence for the specific language governing permissions and limitations under the Licence. // package storage type Follow struct { Follower Person FollowerID uint Follows Person FollowsID uint } func (s *Storage) GetFollowersFor(url string) ([]Follow, error) { var followed *Person = &Person{} s.Db.Table("people").First(&followed, "url = ?", url) var f []Follow = make([]Follow, 0) s.Db.Table("follows").Find(&f, "follows_id = ?", followed.ID) return f, nil }