(
Extension(current_guild): Extension<CurrentUserGuild>,
State(state): State<AppState>,
)
| 22 | }; |
| 23 | |
| 24 | pub async fn get_all_guild_scripts( |
| 25 | Extension(current_guild): Extension<CurrentUserGuild>, |
| 26 | State(state): State<AppState>, |
| 27 | ) -> ApiResult<impl IntoResponse> { |
| 28 | let scripts = state |
| 29 | .db |
| 30 | .list_scripts(current_guild.id) |
| 31 | .await |
| 32 | .map_err(|err| { |
| 33 | error!(%err, "failed fetching guild scripts"); |
| 34 | ApiErrorResponse::InternalError |
| 35 | })?; |
| 36 | |
| 37 | Ok(Json(scripts)) |
| 38 | } |
| 39 | |
| 40 | #[derive(Serialize)] |
| 41 | pub struct GetScriptsWithPluginsResponse { |
nothing calls this directly
no test coverage detected