Handle admin deletions
This commit is contained in:
		
							parent
							
								
									d15bf891db
								
							
						
					
					
						commit
						1a03719473
					
				
					 2 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -51,7 +51,7 @@
 | 
				
			||||||
          ];
 | 
					          ];
 | 
				
			||||||
          env = {
 | 
					          env = {
 | 
				
			||||||
            DATABASE_URL = "/tmp/sqlite.db";
 | 
					            DATABASE_URL = "/tmp/sqlite.db";
 | 
				
			||||||
            ADMIN_PUBKEY = "npub14d2a54za7dnfzktle40vw7kdx48vk3ljy3t7w7sdpk3segea65mq2t6kc4";
 | 
					            ADMIN_PUBKEY = "npub1m2w0ckmkgj4wtvl8muwjynh56j3qd4nddca4exdg4mdrkepvfnhsmusy54";
 | 
				
			||||||
            RUST_BACKTRACE = 1;
 | 
					            RUST_BACKTRACE = 1;
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1266,6 +1266,10 @@ impl Noose for NostrSqlite {
 | 
				
			||||||
                        Err(e) => Command::ServiceError(e),
 | 
					                        Err(e) => Command::ServiceError(e),
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                Command::DbReqDeleteEvents(client_id, event) => match self.admin_delete_events(&event).await {
 | 
				
			||||||
 | 
					                    Ok(status) => Command::DbResOkWithStatus(client_id, status),
 | 
				
			||||||
 | 
					                    Err(e) => Command::ServiceError(e),
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                Command::DbReqEventCounts(client_id, subscriptioin) => {
 | 
					                Command::DbReqEventCounts(client_id, subscriptioin) => {
 | 
				
			||||||
                    match self.counts(subscriptioin).await {
 | 
					                    match self.counts(subscriptioin).await {
 | 
				
			||||||
                        Ok(relay_message) => Command::DbResEventCounts(client_id, relay_message),
 | 
					                        Ok(relay_message) => Command::DbResEventCounts(client_id, relay_message),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue