Skip to content

Commit

Permalink
Add blank validation on submission ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jdsutherland committed Jan 2, 2019
1 parent 021c0b3 commit 400b286
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ func (ctx *submitContext) documents(exerciseDir string) ([]workspace.Document, e
}

func (ctx *submitContext) submitRequest(id string, docs []workspace.Document) error {
if id == "" {
return errors.New("id is empty")
}
if len(docs) == 0 {
return errors.New("docs is empty")
}
Expand Down

0 comments on commit 400b286

Please sign in to comment.