diff options
| author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-05-12 14:32:50 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-05-12 14:52:25 -0700 |
| commit | fca8f5d8addeebba7d55d4b69159745c84f27a91 (patch) | |
| tree | 960bf01540ba1b5a8d7935666a8c37a531f597c4 /api/dns | |
| parent | cd324e1d48505410f0b11f26d6c415415ebf098e (diff) | |
| download | hatecomputers.club-fca8f5d8addeebba7d55d4b69159745c84f27a91.tar.gz hatecomputers.club-fca8f5d8addeebba7d55d4b69159745c84f27a91.zip | |
fix segfault
Diffstat (limited to 'api/dns')
| -rw-r--r-- | api/dns/dns.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/dns/dns.go b/api/dns/dns.go index 6357dfc..7e9c7c7 100644 --- a/api/dns/dns.go +++ b/api/dns/dns.go @@ -20,6 +20,10 @@ var UserOwnedInternalFmtDomains = []string{"%s", "%s.endpoints"} func ListDNSRecordsContinuation(context *types.RequestContext, req *http.Request, resp http.ResponseWriter) types.ContinuationChain { return func(success types.Continuation, failure types.Continuation) types.ContinuationChain { + if context.User == nil { + return failure(context, req, resp) + } + dnsRecords, err := database.GetUserDNSRecords(context.DBConn, context.User.ID) if err != nil { log.Println(err) |
