`[feature/plugins]` Some plugin work?
parent: tbd commit: 10a447b
1 | use crate Contents; |
2 | use crate; |
3 | use crate IssuesPluginState; |
4 | use crate:: |
5 | |
6 | CreateIssueRequest, IssueCreationError, IssueEditError, IssueEditRequest, |
7 | IssuePostCommentError, IssuePostCommentRequest, IssueQueryError, QueryIssuesRequest, |
8 | , |
9 | Issue, |
10 | ; |
11 | |
12 | use ; |
13 | |
14 | pub async |
15 | _state: IssuesPluginState, |
16 | repository: Repository, |
17 | _request: CreateIssueRequest, |
18 | |
19 | // // TODO: AUTHN & AUTHZ |
20 | // let issue = sqlx::query_as!( |
21 | // IssueRow, |
22 | // r#"INSERT INTO issues VALUES (null, $1, $2, $3, $4, $5) RETURNING *"#, |
23 | // repository.to_string(), |
24 | // request.author.to_string(), |
25 | // 0, |
26 | // request.name, |
27 | // request.contents, |
28 | // ) |
29 | // .fetch_one(&state.pool) |
30 | // .await |
31 | // .as_internal_error_with_context("creating issue in db")?; |
32 | |
33 | // Ok(Issue { |
34 | // repository, |
35 | // id: issue.id as u32, |
36 | // }) |
37 | |
38 | Ok |
39 | |
40 | |
41 | pub async |
42 | _state: IssuesPluginState, |
43 | _repository: Repository, |
44 | _request: QueryIssuesRequest, |
45 | |
46 | // TODO: AUTHN & AUTHZ |
47 | todo! |
48 | |
49 | |
50 | pub async |
51 | _state: IssuesPluginState, |
52 | _issue: Issue, |
53 | _request: IssueEditRequest, |
54 | |
55 | // TODO: AUTHN & AUTHZ |
56 | todo! |
57 | |
58 | |
59 | pub async |
60 | _state: IssuesPluginState, |
61 | _issue: Issue, |
62 | _request: IssuePostCommentRequest, |
63 | |
64 | // TODO: AUTHN & AUTHZ |
65 | todo! |
66 | |
67 | |
68 | pub async |
69 | _state: IssuesPluginState, |
70 | _issue: Issue, |
71 | |
72 | todo! |
73 | |
74 | |
75 | pub async |
76 | _state: IssuesPluginState, |
77 | _issue: Issue, |
78 | |
79 | todo! |
80 | |
81 | |
82 | pub async |
83 | _state: IssuesPluginState, |
84 | _issue: Issue, |
85 | |
86 | todo! |
87 | |
88 | |
89 | pub async |
90 | _state: IssuesPluginState, |
91 | _issue: Issue, |
92 | _name: Name, |
93 | |
94 | todo! |
95 | |
96 | |
97 | pub async |
98 | _state: IssuesPluginState, |
99 | _issue: Issue, |
100 | |
101 | todo! |
102 | |
103 | |
104 | pub async |
105 | _state: IssuesPluginState, |
106 | _issue: Issue, |
107 | _contents: Contents, |
108 | |
109 | todo! |
110 | |
111 | |
112 | pub async |
113 | _state: IssuesPluginState, |
114 | _issue: Issue, |
115 | |
116 | todo! |
117 | |
118 |