mirror of
https://github.com/Cernobor/oko-server.git
synced 2025-02-24 08:27:17 +00:00
Existing proposals in data.
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
* Data contains existing proposals too. #2
This commit is contained in:
parent
8440e3b7d7
commit
8e713ae8da
@ -91,6 +91,7 @@ type HandshakeResponse struct {
|
||||
type Data struct {
|
||||
Users []User `json:"users"`
|
||||
Features []Feature `json:"features"`
|
||||
Proposals []Proposal `json:"proposals"`
|
||||
PhotoMetadata map[string]PhotoMetadata `json:"photo_metadata,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -293,10 +293,15 @@ func (s *Server) getData(conn *sqlite.Conn) (data models.Data, err error) {
|
||||
if err != nil {
|
||||
return models.Data{}, fmt.Errorf("failed to retreive features: %w", err)
|
||||
}
|
||||
proposals, err := s.getProposals(conn)
|
||||
if err != nil {
|
||||
return models.Data{}, fmt.Errorf("failed to retrieve proposals: %w", err)
|
||||
}
|
||||
|
||||
return models.Data{
|
||||
Users: people,
|
||||
Features: features,
|
||||
Proposals: proposals,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user