mirror of
https://github.com/hohn/codeql-javascript-multiflow.git
synced 2025-12-16 20:03:04 +01:00
Add nested if() test. Update source locations.
This commit is contained in:
committed by
=Michael Hohn
parent
d02e26d6d2
commit
405b3a0661
17
source/sample-utility-1.js
Normal file
17
source/sample-utility-1.js
Normal file
@@ -0,0 +1,17 @@
|
||||
var SampleUtility = function () {
|
||||
var value = this.getParameter('value');
|
||||
|
||||
var ua = new GR('users');
|
||||
ua.query();
|
||||
|
||||
if (!ua.hasNext()) {
|
||||
ua.initialize();
|
||||
ua.setValue('status', value);
|
||||
ua.insert();
|
||||
}
|
||||
else {
|
||||
ua.next();
|
||||
ua.setValue('status', value);
|
||||
ua.update();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user