mirror of
https://github.com/creating2morrow/neveko.git
synced 2024-12-22 11:39:22 +00:00
refactor market and core modules
This commit is contained in:
parent
224053360f
commit
84a7656616
7 changed files with 10 additions and 18 deletions
|
@ -3,7 +3,7 @@ use log::{
|
|||
error,
|
||||
info,
|
||||
};
|
||||
use neveko_core::{
|
||||
use crate::{
|
||||
db,
|
||||
models::*,
|
||||
utils,
|
|
@ -1,12 +1,15 @@
|
|||
pub mod args; // command line arguments
|
||||
pub mod auth; // internal auth repo/service layer
|
||||
pub mod contact; // contact repo/service layer
|
||||
pub mod dispute; // Dispute repo/service layer
|
||||
pub mod db; // lmdb interface
|
||||
pub mod gpg; // gpgme interface
|
||||
pub mod i2p; // i2p repo/service layer
|
||||
pub mod message; // message repo/service layer
|
||||
pub mod models; // db structs
|
||||
pub mod monero; // monero-wallet-rpc interface
|
||||
pub mod order; // Order repo/service layer
|
||||
pub mod product; // Product repo/service layer
|
||||
pub mod proof; // external auth/payment proof module
|
||||
pub mod reqres; // http request/responses
|
||||
pub mod user; // misc.
|
||||
|
|
|
@ -3,7 +3,7 @@ use log::{
|
|||
error,
|
||||
info,
|
||||
};
|
||||
use neveko_core::{
|
||||
use crate::{
|
||||
db,
|
||||
models::*,
|
||||
monero,
|
||||
|
@ -33,9 +33,9 @@ impl StatusType {
|
|||
/// Create a intial order
|
||||
pub async fn create(j_order: Json<reqres::OrderRequest>) -> Order {
|
||||
info!("creating order");
|
||||
let wallet_name = String::from(neveko_core::APP_NAME);
|
||||
let wallet_name = String::from(crate::APP_NAME);
|
||||
let wallet_password =
|
||||
std::env::var(neveko_core::MONERO_WALLET_PASSWORD)
|
||||
std::env::var(crate::MONERO_WALLET_PASSWORD)
|
||||
.unwrap_or(String::from("password"));
|
||||
monero::close_wallet(&wallet_name, &wallet_password).await;
|
||||
let ts = chrono::offset::Utc::now().timestamp();
|
|
@ -4,7 +4,7 @@ use log::{
|
|||
error,
|
||||
info,
|
||||
};
|
||||
use neveko_core::{
|
||||
use crate::{
|
||||
db,
|
||||
models::*,
|
||||
utils,
|
|
@ -9,12 +9,6 @@ use rocket::{
|
|||
|
||||
use neveko_core::*;
|
||||
|
||||
use crate::{
|
||||
dispute,
|
||||
order,
|
||||
product,
|
||||
};
|
||||
|
||||
// JSON APIs
|
||||
|
||||
/// Create a product by passings json product
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
pub mod controller; // HTTP entry point
|
||||
pub mod dispute; // Dispute repo/service layer
|
||||
pub mod order; // Order repo/service layer
|
||||
pub mod product; // Product repo/service layer
|
||||
|
||||
// DO NOT EDIT BELOW THIS LINE
|
||||
// Keep complex logic in the core module
|
||||
pub mod controller;
|
||||
|
|
|
@ -7,7 +7,6 @@ use rocket::{
|
|||
};
|
||||
|
||||
use neveko_core::*;
|
||||
use neveko_market::*;
|
||||
|
||||
// JSON APIs exposed over i2p
|
||||
|
||||
|
|
Loading…
Reference in a new issue