Crashes are now saved in the database

This commit is contained in:
2019-11-04 16:34:00 +09:00
parent 604dc3c755
commit 2e9ad4bf6f
11 changed files with 125 additions and 5 deletions

View File

@ -14,7 +14,7 @@ type ClientErrorReport struct {
hasCreator
}
// StreamClientErrorReports returns a stream of all characters.
// StreamClientErrorReports returns a stream of all client error reports.
func StreamClientErrorReports() <-chan *ClientErrorReport {
channel := make(chan *ClientErrorReport, nano.ChannelBufferSize)
@ -29,10 +29,9 @@ func StreamClientErrorReports() <-chan *ClientErrorReport {
return channel
}
// AllClientErrorReports returns a slice of all characters.
// AllClientErrorReports returns a slice of all client error reports.
func AllClientErrorReports() []*ClientErrorReport {
all := make([]*ClientErrorReport, 0, DB.Collection("ClientErrorReport").Count())
stream := StreamClientErrorReports()
for obj := range stream {