Browse Source

mv q/1,2 and qc/1,2 to n2o (n4u)

221V 1 year ago
parent
commit
533365bd23
2 changed files with 2 additions and 15 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 15
      src/nitro.erl

+ 1 - 0
CHANGELOG.md

@@ -19,6 +19,7 @@
 * mv nitro_conv > nitro module  
 * mv redirect to n2o (n4u)  
 * mv work with cookies to n2o (n4u)  
+* mv q/1,2 and qc/1,2 to n2o (n4u)  
 
 ##### 6.6.1-erl19
 * update to 6.6.1 tag by [@5HT Maksym Sokhatskyi/Namdak Tönpa](https://github.com/5HT)  

+ 1 - 15
src/nitro.erl

@@ -6,7 +6,7 @@
 -include_lib("nitro/include/event.hrl").
 
 
--export([atom/1, q/1, q/2, qc/1, qc/2, f/1, f/2, coalesce/1,
+-export([atom/1, f/1, f/2, coalesce/1,
   pickle/1, depickle/1, unique_integer/0, temp_id/0,
   to_list/1, to_atom/1, to_binary/1, to_integer/1,
   join/2, replace/3, indexof/2, indexof/3, append/3, os_env/1, os_env/2,
@@ -24,20 +24,6 @@ atom(List) when erlang:is_list(List) ->
 atom(Scalar) -> ?MODULE:to_list(Scalar).
 
 
-q(Key) -> q(Key, []). %% todo unwrap
-q(Key, Def) ->
-  case erlang:get(Key) of
-    undefined -> Def;
-    Val -> Val
-  end.
-
-qc(Key) ->
-  CX = erlang:get(context),
-  qc(Key, CX#cx.req).
-qc(Key, Req) ->
-  proplists:get_value(?MODULE:to_binary(Key), cowboy_req:parse_qs(Req)).
-
-
 %% Convert and Utils API
 
 f(S) -> f(S, []).