|
123456789101112131415161718 |
- package service
-
- import (
- "egg-im/internal/business/comm/db"
- "egg-im/pkg/pb"
- )
-
- func EmoticonList() ([]*pb.Emoticon, error) {
- emoticons, err := db.DbEmoticon.EmoticonFind()
- if err != nil {
- return nil, err
- }
- pbEmoticons := make([]*pb.Emoticon, len(*emoticons))
- for i, v := range *emoticons {
- pbEmoticons[i] = v.ToProto()
- }
- return pbEmoticons, nil
- }
|