Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

创建博客 #1

Open
phodal opened this issue Apr 15, 2023 · 1 comment
Open

创建博客 #1

phodal opened this issue Apr 15, 2023 · 1 comment

Comments

@phodal
Copy link
Member

phodal commented Apr 15, 2023

作为一个用户,我想新建博客,如果成功返回 id,如果失败返回对应错误信息

@phodal phodal changed the title 作为一个用户,我想新建博客,如果成功返回 id,如果失败返回对应错误信息 创建博客 Apr 15, 2023
@phodal
Copy link
Member Author

phodal commented Apr 16, 2023

用户故事:新建博客
作为一位博客作者
我想在InnoRev网站上新建博客
以便于我可以发布我的文章

AC 1: 新建博客成功
假设用户已经登录,并且填写了正确的博客信息
当用户点击“新建博客”按钮
于是系统创建一个新的博客,并返回博客的id

AC 2: 博客标题过长
假设用户已经登录,并且填写了超过50个字符的博客标题
当用户点击“新建博客”按钮
于是系统返回“博客标题过长”的错误信息

AC 3: 博客正文为空
假设用户已经登录,并且没有填写博客正文
当用户点击“新建博客”按钮
于是系统返回“博客正文不能为空”的错误信息

AC 4: 系统错误
假设系统发生错误
当用户点击“新建博客”按钮
于是系统返回“系统错误,请稍后再试”的错误信息

// {API Method} POST {API URI} /blogs
// CreateBlogRequest: { "title": "My First Blog", "content": "Hello world!" }
// CreateBlogResponse: { "id": 1, "title": "My First Blog", "content": "Hello world!" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant