Skip to content

Commit

Permalink
Change macro arguments order to make more sense
Browse files Browse the repository at this point in the history
  • Loading branch information
Leinnan committed Feb 15, 2024
1 parent 3a43126 commit d51ea03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions bevy_forge/src/beam/utils.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
pub mod macros {
macro_rules! create_microservice_request {
(
$task_name: ident,
$event_started_name: ident,
$event_completed_name: ident,
$call_from_open_api: expr,
$call_args_type: ident,
$result_type_success: ident,
$result_type_error: ident,
$task_name: ident,
$call_from_open_api: expr
$result_type_error: ident
) => {
#[derive(Event, Deref, DerefMut)]
pub struct $event_started_name(pub $call_args_type);
Expand Down
16 changes: 8 additions & 8 deletions bevy_forge/src/microservice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ use beam_microservice::models::{SayHiRequestArgs, SellSwordRequestArgs};
use bevy::prelude::*;

create_microservice_request!(
RequestSayHi,
SayHiEvent,
SayHiEventCompleted,
beam_microservice::apis::uncategorized_api::say_hi_post,
SayHiRequestArgs,
String,
SayHiPostError,
RequestSayHiTask,
beam_microservice::apis::uncategorized_api::say_hi_post
SayHiPostError
);
create_microservice_request!(
RequestSellSword,
SellSwordEvent,
SellSwordEventCompleted,
beam_microservice::apis::uncategorized_api::sell_sword_post,
SellSwordRequestArgs,
bool,
SellSwordPostError,
RequestSellSwordTask,
beam_microservice::apis::uncategorized_api::sell_sword_post
SellSwordPostError
);

pub struct MicroservicePlugin;

impl Plugin for MicroservicePlugin {
fn build(&self, app: &mut App) {
RequestSayHiTask::register(app);
RequestSellSwordTask::register(app);
RequestSayHi::register(app);
RequestSellSword::register(app);
}
}

0 comments on commit d51ea03

Please sign in to comment.