1
0
mirror of https://github.com/writeas/writeas-cli synced 2025-07-26 23:08:16 +00:00

default to user collection

new posts, when no flag is specified for blog or collection, will now
default to the user collection. that is the username.
This commit is contained in:
Rob Loranger 2019-06-12 20:06:42 -07:00
parent 2412d21fce
commit 3f8b0d0c6e
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8

View File

@ -53,6 +53,10 @@ func Collection(c *cli.Context) string {
if coll := c.String("b"); coll != "" {
return coll
}
u, _ := LoadUser(c)
if u != nil {
return u.User.Username
}
return ""
}